Skip to content

Commit

Permalink
Correct tab completion of the dump command commandline
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker authored and tridge committed Jan 10, 2024
1 parent 2aeaaff commit 76370bc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions MAVProxy/modules/lib/rline.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def __init__(self, prompt, mpstate):
'(FILENAME)' : complete_filename,
'(PARAMETER)' : complete_parameter,
'(VARIABLE)' : complete_variable,
'(MESSAGETYPE)' : complete_messagetype,
'(SETTING)' : rline_mpstate.settings.completion,
'(COMMAND)' : complete_command,
'(ALIAS)' : complete_alias,
Expand Down Expand Up @@ -232,6 +233,12 @@ def complete_variable(text):

return []

def complete_messagetype(text):
'''complete a MAVLink message type'''
global rline_mpstate

return list(filter(lambda x : x.startswith(text), rline_mpstate.status.msgs.keys()))

def rule_expand(component, text):
'''expand one rule component'''
global rline_mpstate
Expand Down
1 change: 1 addition & 0 deletions MAVProxy/tools/MAVExplorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ def __init__(self):
"set" : ["(SETTING)"],
"condition" : ["(VARIABLE)"],
"graph" : ['(VARIABLE) (VARIABLE) (VARIABLE) (VARIABLE) (VARIABLE) (VARIABLE) (VARIABLE) (VARIABLE) (VARIABLE) (VARIABLE) (VARIABLE) (VARIABLE)'],
"dump" : ['(VARIABLE)'],
"map" : ['(VARIABLE) (VARIABLE) (VARIABLE) (VARIABLE) (VARIABLE)'],
"param" : ['download', 'check', 'help (PARAMETER)'],
}
Expand Down

0 comments on commit 76370bc

Please # to comment.