]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
bash-completion: (setarch) show some options as the 1st arg
authorMasatake YAMATO <yamato@redhat.com>
Thu, 27 Mar 2025 20:41:47 +0000 (05:41 +0900)
committerMasatake YAMATO <yamato@redhat.com>
Thu, 27 Mar 2025 20:42:30 +0000 (05:42 +0900)
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
bash-completion/setarch

index 4496e97df8b3ffec444606fabab39ee19ba89528..7d7bdb00c5b692dd9ba7f7496c79e0483a5e570c 100644 (file)
@@ -10,7 +10,14 @@ _setarch_module()
                        ;;
        esac
        if [ $COMP_CWORD -eq 1 ]; then
-               COMPREPLY=( $(compgen -W "$($1 --list)" -- $cur) )
+               OPTS="$($1 --list)"
+               OPTS="$OPTS
+                       --list
+                       --help
+                       --version
+                       --show
+               "
+               COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
                return 0
        fi
        case $cur in