Merge pull request #100 from szymex73/fix-argcomplete

Fix argument autocompleter bug (#97)
This commit is contained in:
Philippe Teuwen
2023-08-26 20:47:38 +02:00
committed by GitHub
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)
- Fix device address is not the same with APP (@taichunmin)
- Added initial version of the user guides (@GameTec-live)
- Added support for pasting several command lines at once with prompt_toolkit (@doegox)
+1 -1
View File
@@ -271,7 +271,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())