diff options
author | Jiří Klimeš <jklimes@redhat.com> | 2015-07-15 15:56:52 +0200 |
---|---|---|
committer | Jiří Klimeš <jklimes@redhat.com> | 2015-07-15 16:00:18 +0200 |
commit | 133996acbb887fcd1935ba59f8956b67411cb3b2 (patch) | |
tree | 6658ba22d7c0d9a7ab3a8a1ab265f913395bdd70 | |
parent | 819d3c3db129e95fac77a83cc9bcee5e92d1953f (diff) | |
download | NetworkManager-133996acbb887fcd1935ba59f8956b67411cb3b2.tar.gz |
cli: add 'slave-type' parameter for "nmcli con add" to bash completion
Fixes: 1375d9c13ad6062f2c84089242f0dcfac1bd8e07
-rw-r--r-- | clients/cli/nmcli-completion | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/clients/cli/nmcli-completion b/clients/cli/nmcli-completion index 825008cbb5..eb352d5269 100644 --- a/clients/cli/nmcli-completion +++ b/clients/cli/nmcli-completion @@ -467,6 +467,12 @@ _nmcli_compl_ARGS() return 0 fi ;; + slave-type) + if [[ "${#words[@]}" -eq 2 ]]; then + _nmcli_list "bond team bridge" + return 0 + fi + ;; lacp-rate) if [[ "${#words[@]}" -eq 2 ]]; then _nmcli_list "slow fast" @@ -934,7 +940,7 @@ _nmcli() ;; a|ad|add) if [[ ${#words[@]} -eq 3 ]]; then - _nmcli_compl_COMMAND "${words[2]}" type ifname con-name autoconnect master + _nmcli_compl_COMMAND "${words[2]}" type ifname con-name autoconnect master slave-type elif [[ ${#words[@]} -gt 3 ]]; then _nmcli_array_delete_at words 0 1 @@ -947,14 +953,14 @@ _nmcli() ;; 1) if [[ "$HELP_ONLY_AS_FIRST" == 1 ]]; then - _nmcli_compl_COMMAND "${words[2]}" type ifname con-name autoconnect master + _nmcli_compl_COMMAND "${words[2]}" type ifname con-name autoconnect master slave-type fi return 0 ;; esac OPTIONS_TYPE= - OPTIONS=(type ifname con-name autoconnect save master) + OPTIONS=(type ifname con-name autoconnect save master slave-type) OPTIONS_MANDATORY=(type ifname) COMMAND_ARGS_WAIT_OPTIONS=1 OPTIONS_MANDATORY_IFNAME=1 |