From 09a015b23b38438bf0f803a03eb2a79caf76b178 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 19 May 2016 09:40:44 +0200 Subject: [PATCH] nmcli-completion: complete filename for VPN import and passwd-file Also hard-code the VPN types strongswan and fortisslvpn. https://bugzilla.redhat.com/show_bug.cgi?id=1337300 --- clients/cli/nmcli-completion | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/clients/cli/nmcli-completion b/clients/cli/nmcli-completion index 3c87f6f9d..ffab7d8b9 100644 --- a/clients/cli/nmcli-completion +++ b/clients/cli/nmcli-completion @@ -494,7 +494,7 @@ _nmcli_compl_ARGS() ;; vpn-type) if [[ "${#words[@]}" -eq 2 ]]; then - _nmcli_list "vpnc openvpn pptp openconnect openswan libreswan ssh l2tp iodine" + _nmcli_list "vpnc openvpn pptp openconnect openswan libreswan strongswan ssh l2tp iodine fortisslvpn" return 0 fi ;; @@ -579,10 +579,16 @@ _nmcli_compl_ARGS() user| \ username| \ service| \ - password| \ + password) + if [[ "${#words[@]}" -eq 2 ]]; then + return 0 + fi + ;; passwd-file| \ file) if [[ "${#words[@]}" -eq 2 ]]; then + compopt -o default + COMPREPLY=() return 0 fi ;; @@ -1379,8 +1385,7 @@ _nmcli() OPTIONS=(type file) OPTIONS_MANDATORY=(type file) - ALIASES=("type:vpn-type") - _nmcli_compl_ARGS ${ALIASES[@]} + _nmcli_compl_ARGS type:vpn-type return 0 fi ;;