]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
bash-completion: cleanup mount and umount --namespace
authorKarel Zak <kzak@redhat.com>
Fri, 5 Oct 2018 09:48:04 +0000 (11:48 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 5 Oct 2018 09:48:04 +0000 (11:48 +0200)
* use only PATHs rather than PIDs to namespaces

* add --namespace to umount too

Signed-off-by: Karel Zak <kzak@redhat.com>
bash-completion/mount
bash-completion/umount

index 35cb19f7a7bbcff1771db9117b70fff139109ec9..832947fd73fc65c781db0fc0b6582fa57cdfabe7 100644 (file)
@@ -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
                        ;;
index 942857718b6e19ec43ec758d0e30baf0335c5236..496474a9b614e5daad7e107b2d0f3d5766ab2035 100644 (file)
@@ -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