mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-21 01:40:33 +01:00
cli: prefer 'modify' over 'monitor' when the command is abbreviated
In previous releases 'nmcli connection m' was interpreted as 'modify', but recently the monitor command was introduced with a higher priority, changing the behavior when the abbreviated form is used. Restore the old behavior. https://bugzilla.redhat.com/show_bug.cgi?id=1316120
This commit is contained in:
parent
551c5de120
commit
f0c6a0315d
2 changed files with 3 additions and 3 deletions
|
|
@ -11123,8 +11123,6 @@ do_connections (NmCli *nmc, int argc, char **argv)
|
|||
g_thread_unref (editor_thread);
|
||||
} else if (matches(*argv, "delete") == 0) {
|
||||
nmc->return_value = do_connection_delete (nmc, argc-1, argv+1);
|
||||
} else if (matches(*argv, "monitor") == 0) {
|
||||
nmc->return_value = do_connection_monitor (nmc, argc-1, argv+1);
|
||||
} else if (matches(*argv, "reload") == 0) {
|
||||
nmc->return_value = do_connection_reload (nmc, argc-1, argv+1);
|
||||
} else if (matches(*argv, "load") == 0) {
|
||||
|
|
@ -11158,6 +11156,8 @@ do_connections (NmCli *nmc, int argc, char **argv)
|
|||
nmc->return_value = do_connection_import (nmc, temporary, argc, argv);
|
||||
} else if (matches(*argv, "export") == 0) {
|
||||
nmc->return_value = do_connection_export (nmc, argc-1, argv+1);
|
||||
} else if (matches(*argv, "monitor") == 0) {
|
||||
nmc->return_value = do_connection_monitor (nmc, argc-1, argv+1);
|
||||
} else {
|
||||
usage ();
|
||||
g_string_printf (nmc->return_text, _("Error: '%s' is not valid 'connection' command."), *argv);
|
||||
|
|
|
|||
|
|
@ -1325,7 +1325,7 @@ _nmcli()
|
|||
;;
|
||||
|
||||
de|del|dele|delet|delete| \
|
||||
m|mo|mon|moni|monit|monito|monitor)
|
||||
mon|moni|monit|monito|monitor)
|
||||
if [[ ${#words[@]} -eq 3 ]]; then
|
||||
_nmcli_compl_COMMAND_nl "${words[2]}" "$(printf "id\nuuid\npath\n%s" "$(_nmcli_con_show NAME)")"
|
||||
elif [[ ${#words[@]} -gt 3 ]]; then
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue