Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct tab completion of the dump command commandline #1303

Merged
merged 1 commit into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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