From: Karel Zak Date: Fri, 5 Oct 2018 09:48:04 +0000 (+0200) Subject: bash-completion: cleanup mount and umount --namespace X-Git-Tag: v2.33-rc2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d482a0bd5cbd651595eee1785b1f9cd9d9e23524;p=thirdparty%2Futil-linux.git bash-completion: cleanup mount and umount --namespace * use only PATHs rather than PIDs to namespaces * add --namespace to umount too Signed-off-by: Karel Zak --- diff --git a/bash-completion/mount b/bash-completion/mount index 35cb19f7a7..832947fd73 100644 --- a/bash-completion/mount +++ b/bash-completion/mount @@ -36,7 +36,7 @@ _mount_module() ;; '-N'|'--namespace') local NAMESPACE - NAMESPACE="$(lsns --type mnt --output PATH,PID --noheadings)" + NAMESPACE="$(lsns --type mnt --output PATH --noheadings)" COMPREPLY=( $(compgen -W "$NAMESPACE" -- $cur) ) return 0 ;; diff --git a/bash-completion/umount b/bash-completion/umount index 942857718b..496474a9b6 100644 --- a/bash-completion/umount +++ b/bash-completion/umount @@ -17,6 +17,12 @@ _umount_module() '-h'|'--help'|'-V'|'--version') return 0 ;; + '-N'|'--namespace') + local NAMESPACE + NAMESPACE="$(lsns --type mnt --output PATH --noheadings)" + COMPREPLY=( $(compgen -W "$NAMESPACE" -- $cur) ) + return 0 + ;; esac case $cur in -*) @@ -27,6 +33,7 @@ _umount_module() --fake --force --internal-only + --namespace --no-mtab --lazy --test-opts