cli: option autocompletion should not match words without trailing '-'
This would fix for example: nmcli e <TAB> (e interpreted as --escape, would allow autocompletion to work... but when the command is executed an error is reported) Moreover, we will now have: nmcli c <TAB> autocompletion work correctly, i.e., c is correctly interpreted as "connection" instead of "--colors"
This commit is contained in:
@@ -123,6 +123,8 @@ _nmcli_compl_match_option()
|
||||
S="${S:2}"
|
||||
elif [[ "${S:0:1}" == "-" ]]; then
|
||||
S="${S:1}"
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
for V; do
|
||||
case "$V" in
|
||||
|
Reference in New Issue
Block a user