Fix argument autocompleter bug (#97)

This commit is contained in:
Szymon Borecki
2023-08-26 19:24:41 +02:00
parent 86fcaa3d56
commit 5122246072
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file.
This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log...
## [unreleased][unreleased]
- Fixed argument completion bug inserting additional hyphens (@szymex73)
- Added initial version of the user guides (@GameTec-live)
- Added support for pasting several command lines at once with prompt_toolkit (@doegox)
- Added support for interrupting sleep sequence with a button press during animation (@doegox)
+1 -1
View File
@@ -265,7 +265,7 @@ class ArgparseCompleter(Completer):
def get_completions(self, document, complete_event):
text = document.text_before_cursor
word_before_cursor = document.get_word_before_cursor()
word_before_cursor = document.text_before_cursor.split(' ')[-1]
_, _, suggestions = self.check_tokens(list(), text.split())