]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - bash-completion/namei
su: use lib/pty-session.c code for --pty
[thirdparty/util-linux.git] / bash-completion / namei
index c44821c5ac9d45ee195204e65dfe22f5ec9a95cc..640273500a19b92e27bbf76b08c037d9dbbaa6db 100644 (file)
@@ -3,13 +3,20 @@ _namei_module()
        local cur prev OPTS
        COMPREPLY=()
        cur="${COMP_WORDS[COMP_CWORD]}"
+       prev="${COMP_WORDS[COMP_CWORD-1]}"
+       case $prev in
+               '-h'|'--help'|'-V'|'--version')
+                       return 0
+                       ;;
+       esac
        case $cur in
                -*)
-                       OPTS="-h --help -V --version -x --mountpoints -m --modes -o --owners -l --long -n --nosymlinks -v --vertical"
+                       OPTS="--help --version --mountpoints --modes --owners --long --nosymlinks --vertical"
                        COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
                        return 0
                        ;;
        esac
+       local IFS=$'\n'
        compopt -o filenames
        COMPREPLY=( $(compgen -f -- $cur) )
        return 0