diff options
author | Karel Zak | 2018-10-05 11:48:04 +0200 |
---|---|---|
committer | Karel Zak | 2018-10-05 11:48:04 +0200 |
commit | d482a0bd5cbd651595eee1785b1f9cd9d9e23524 (patch) | |
tree | a4544a5404ce9396cd25fb46cce011709c723533 /bash-completion/umount | |
parent | Merge branch '2018wk40' of https://github.com/kerolasa/util-linux (diff) | |
download | kernel-qcow2-util-linux-d482a0bd5cbd651595eee1785b1f9cd9d9e23524.tar.gz kernel-qcow2-util-linux-d482a0bd5cbd651595eee1785b1f9cd9d9e23524.tar.xz kernel-qcow2-util-linux-d482a0bd5cbd651595eee1785b1f9cd9d9e23524.zip |
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 <kzak@redhat.com>
Diffstat (limited to 'bash-completion/umount')
-rw-r--r-- | bash-completion/umount | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bash-completion/umount b/bash-completion/umount index 942857718..496474a9b 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 |