]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
bash-completion: prefix "command" to other external commands
authorKoichi Murase <myoga.murase@gmail.com>
Tue, 3 Jun 2025 12:50:22 +0000 (21:50 +0900)
committerKoichi Murase <myoga.murase@gmail.com>
Tue, 3 Jun 2025 13:39:19 +0000 (22:39 +0900)
31 files changed:
bash-completion/blkid
bash-completion/chcpu
bash-completion/coresched
bash-completion/delpart
bash-completion/eject
bash-completion/findmnt
bash-completion/fsfreeze
bash-completion/fstrim
bash-completion/ionice
bash-completion/ipcrm
bash-completion/logger
bash-completion/look
bash-completion/losetup
bash-completion/lslocks
bash-completion/lslogins
bash-completion/mkswap
bash-completion/mount
bash-completion/partx
bash-completion/renice
bash-completion/resizepart
bash-completion/rfkill
bash-completion/rtcwake
bash-completion/setpriv
bash-completion/su
bash-completion/swaplabel
bash-completion/swapoff
bash-completion/swapon
bash-completion/taskset
bash-completion/umount
bash-completion/wipefs
bash-completion/write

index c5b1ed8895b45edc5e125bdc512ede2cabf9b181..175f1746d232240cc9ccd643c96b8f8231d1810c 100644 (file)
@@ -45,8 +45,8 @@ _blkid_module()
                        ;;
                '-n'|'--match-types')
                        OUTPUT_ALL="
-                               $(awk '{print $NF}' /proc/filesystems)
-                               $(\ls /lib/modules/$(uname -r)/kernel/fs)
+                               $(command awk '{print $NF}' /proc/filesystems)
+                               $(\ls /lib/modules/$(command uname -r)/kernel/fs)
                        "
                        ;;
                '-h'|'--help'|'-V'|'--version')
index 0d96c25321e6cce7f15696460226c46775d79f7d..50b1da4a344cce88d2828af9af0d15d52a30ed80 100644 (file)
@@ -9,7 +9,7 @@ _chcpu_module()
                        local prefix realcur CPULIST_ALL CPULIST
                        realcur="${cur##*,}"
                        prefix="${cur%$realcur}"
-                       CPULIST_ALL=$(sed 's/^/{/; s/-/../g; s/,/} {/g; s/$/}/' /sys/devices/system/cpu/offline)
+                       CPULIST_ALL=$(command sed 's/^/{/; s/-/../g; s/,/} {/g; s/$/}/' /sys/devices/system/cpu/offline)
                        for WORD in $(eval echo $CPULIST_ALL); do
                                if ! [[ $prefix == *"$WORD"* ]]; then
                                        CPULIST="$WORD ${CPULIST:-""}"
@@ -23,7 +23,7 @@ _chcpu_module()
                        local prefix realcur CPULIST_ALL CPULIST
                        realcur="${cur##*,}"
                        prefix="${cur%$realcur}"
-                       CPULIST_ALL=$(sed 's/^/{/; s/-/../g; s/,/} {/g; s/$/}/' /sys/devices/system/cpu/online)
+                       CPULIST_ALL=$(command sed 's/^/{/; s/-/../g; s/,/} {/g; s/$/}/' /sys/devices/system/cpu/online)
                        for WORD in $(eval echo $CPULIST_ALL); do
                                if ! [[ $prefix == *"$WORD"* ]]; then
                                        CPULIST="$WORD ${CPULIST:-""}"
index 4629ab4f170f6b5a4573c8f3e4ce2b6d6af7081e..c2d6f4a894f0053920128ef3b9d771c0929b6a2f 100644 (file)
@@ -14,7 +14,7 @@ _coresched_module()
     "-s"|"--source"|"-d"|"--dest")
       local pids sorted_pids
       pids=$(builtin cd /proc && echo [0-9]*)
-      sorted_pids=$(echo "${pids[@]}" | tr ' ' '\n' | sort -nr | tr '\n' ' ')
+      sorted_pids=$(echo "${pids[@]}" | command tr ' ' '\n' | command sort -nr | command tr '\n' ' ')
       COMPREPLY=( $(compgen -W "$sorted_pids" -- "$2") )
       return 0
       ;;
index 12a7e37e7a7b8b5a14ddce8d137aa03c59cf0d7c..175bd812f87489df01766e4b165beb0e3b33e5e0 100644 (file)
@@ -17,7 +17,7 @@ _delpart_module()
                        ;;
                2)
                        prev="${COMP_WORDS[COMP_CWORD-1]}"
-                       COMPREPLY=( $(compgen -W "$(cat /sys/block/${prev##*/}/*/partition 2>/dev/null)" -- $cur) )
+                       COMPREPLY=( $(compgen -W "$(command cat /sys/block/${prev##*/}/*/partition 2>/dev/null)" -- $cur) )
                        ;;
        esac
        return 0
index 27d04656c56a8a593016c520d7e88c81d5e540a0..c4369c2d314e25993c7dc582a24f657113579453 100644 (file)
@@ -15,7 +15,7 @@ _eject_module()
                        return 0
                        ;;
                '-x'|'--cdspeed')
-                       COMPREPLY=( $(compgen -W "$(eject --listspeed 2>/dev/null)" -- $cur) )
+                       COMPREPLY=( $(compgen -W "$(command eject --listspeed 2>/dev/null)" -- $cur) )
                        return 0
                        ;;
                '-h'|'--help'|'-V'|'--version')
@@ -50,7 +50,7 @@ _eject_module()
        esac
        local DEVS
        DEVS="$(for I in /sys/class/block/*/removable; do
-               if [ $(cat $I) -ne 0 ]; then
+               if [ $(command cat $I) -ne 0 ]; then
                        OLD_IFS=$IFS
                        IFS='/';
                        ARR=($I)
index 697691aad08ba837849044fd8a1cb1238fcb184a..5233e6e6353da90ad95c4e8c41c8e24dd5422fa0 100644 (file)
@@ -75,7 +75,7 @@ _findmnt_module()
                        ;;
                '-S'|'--source')
                        local DEV_MPOINT
-                       DEV_MPOINT=$($1 -rno SOURCE | grep ^/dev)
+                       DEV_MPOINT=$($1 -rno SOURCE | command grep ^/dev)
                        COMPREPLY=( $(compgen -W "$DEV_MPOINT" -- $cur) )
                        return 0
                        ;;
index 05bd68e428ab102fe7a7f3d3481b020ada7c2fdb..c30dd5659197973bd5b266a01f07ebab3b23b527 100644 (file)
@@ -17,7 +17,7 @@ _fsfreeze_module()
                        ;;
        esac
        local MPOINT
-       MPOINT="$(findmnt -t ext2,ext3,ext4,reiserfs,jfs,xfs -o TARGET -n -r)"
+       MPOINT="$(command findmnt -t ext2,ext3,ext4,reiserfs,jfs,xfs -o TARGET -n -r)"
        COMPREPLY=( $(compgen -W "$MPOINT" -- $cur) )
        return 0
 }
index fcb006a5453cd91a9c54897ce0b5b1aed2be24b8..26b3ab7588d002965f553e6d43926542f2c14395 100644 (file)
@@ -32,7 +32,7 @@ _fstrim_module()
                        ;;
        esac
        local MPOINTS
-       MPOINTS=$(findmnt -rno SOURCE,TARGET | awk '/^\/dev/{print $2}')
+       MPOINTS=$(command findmnt -rno SOURCE,TARGET | command awk '/^\/dev/{print $2}')
        COMPREPLY=( $(compgen -W "$MPOINTS" -- $cur) )
        return 0
 }
index 96087270bc82045bb9f341df08cff9d9d523ec51..4b43dd0489c6c7450d892a81b0060dff000b6f1d 100644 (file)
@@ -15,7 +15,7 @@ _ionice_module()
                        ;;
                '-P'|'--pgid')
                        local PGID
-                       PGID="$(awk '{print $5}' /proc/*/stat 2>/dev/null | sort -u)"
+                       PGID="$(command awk '{print $5}' /proc/*/stat 2>/dev/null | command sort -u)"
                        COMPREPLY=( $(compgen -W "$PGID" -- $cur) )
                        return 0
                        ;;
@@ -27,7 +27,7 @@ _ionice_module()
                        ;;
                '-u'|'--uid')
                        local UIDS
-                       UIDS="$(stat --format='%u' /proc/[0-9]* | sort -u)"
+                       UIDS="$(command stat --format='%u' /proc/[0-9]* | command sort -u)"
                        COMPREPLY=( $(compgen -W "$UIDS" -- $cur) )
                        return 0
                        ;;
index b5cb95a0654d40ccc4f9fb278657b495ac5fe602..66580558f4c34e06f6bd06d0b6a6121d215399ec 100644 (file)
@@ -6,47 +6,47 @@ _ipcrm_module()
        prev="${COMP_WORDS[COMP_CWORD-1]}"
        case $prev in
                '-m'|'--shmem-id')
-                       KEYIDS="$(lsipc -m --noheadings -o ID)"
+                       KEYIDS="$(command lsipc -m --noheadings -o ID)"
                        COMPREPLY=( $(compgen -W "$KEYIDS" -- $cur) )
                        return 0
                        ;;
                '-M'|'--shmem-key')
-                       KEYIDS="$(lsipc -m --noheadings -o KEY)"
+                       KEYIDS="$(command lsipc -m --noheadings -o KEY)"
                        COMPREPLY=( $(compgen -W "$KEYIDS" -- $cur) )
                        return 0
                        ;;
                '--posix-shmem')
-                       KEYIDS="$(lsipc -M --noheadings -o NAME)"
+                       KEYIDS="$(command lsipc -M --noheadings -o NAME)"
                        COMPREPLY=( $(compgen -W "$KEYIDS" -- $cur) )
                        return 0
                        ;;
                '-q'|'--queue-id')
-                       KEYIDS="$(lsipc -q --noheadings -o ID)"
+                       KEYIDS="$(command lsipc -q --noheadings -o ID)"
                        COMPREPLY=( $(compgen -W "$KEYIDS" -- $cur) )
                        return 0
                        ;;
                '-Q'|'--queue-key')
-                       KEYIDS="$(lsipc -q --noheadings -o KEY)"
+                       KEYIDS="$(command lsipc -q --noheadings -o KEY)"
                        COMPREPLY=( $(compgen -W "$KEYIDS" -- $cur) )
                        return 0
                        ;;
                '--posix-mqueue')
-                       KEYIDS="$(lsipc -Q --noheadings -o NAME)"
+                       KEYIDS="$(command lsipc -Q --noheadings -o NAME)"
                        COMPREPLY=( $(compgen -W "$KEYIDS" -- $cur) )
                        return 0
                        ;;
                '-s'|'--semaphore-id')
-                       KEYIDS="$(lsipc -s --noheadings -o ID)"
+                       KEYIDS="$(command lsipc -s --noheadings -o ID)"
                        COMPREPLY=( $(compgen -W "$KEYIDS" -- $cur) )
                        return 0
                        ;;
                '-S'|'--semaphore-key')
-                       KEYIDS="$(lsipc -s --noheadings -o KEY)"
+                       KEYIDS="$(command lsipc -s --noheadings -o KEY)"
                        COMPREPLY=( $(compgen -W "$KEYIDS" -- $cur) )
                        return 0
                        ;;
                '--posix-semaphore')
-                       KEYIDS="$(lsipc -S --noheadings -o NAME)"
+                       KEYIDS="$(command lsipc -S --noheadings -o NAME)"
                        COMPREPLY=( $(compgen -W "$KEYIDS" -- $cur) )
                        return 0
                        ;;
index 608b85782698b51a9965ad393e33898a1ff3842d..37cb78dcfa519c14e80053583d93c5a4854e441b 100644 (file)
@@ -16,7 +16,7 @@ _logger_module()
                        return 0
                        ;;
                '-P'|'--port')
-                       COMPREPLY=( $(compgen -W "$(awk '$1 ~ /^syslog$/  {split($2, a, "/"); print a[1]}' /etc/services)" -- $cur) )
+                       COMPREPLY=( $(compgen -W "$(command awk '$1 ~ /^syslog$/  {split($2, a, "/"); print a[1]}' /etc/services)" -- $cur) )
                        return 0
                        ;;
                '-p'|'--priority')
@@ -28,7 +28,7 @@ _logger_module()
                        return 0
                        ;;
                '-u'|'--socket')
-                       COMPREPLY=( $(compgen -W "$(awk '$NF ~ /^\// {print $NF}' /proc/net/unix)" -- $cur) )
+                       COMPREPLY=( $(compgen -W "$(command awk '$NF ~ /^\// {print $NF}' /proc/net/unix)" -- $cur) )
                        return 0
                        ;;
                '--socket-errors')
index 8bae52c6193cbb4abbd2ff3df8c4a39f60692a46..e15e7528b63e59f7df2bb2f48c376f9147014e5a 100644 (file)
@@ -24,7 +24,7 @@ _look_module()
                1)
                        [ -f /usr/share/dict/words ] || return 0
                        if [ "$cur" ]; then
-                               COMPREPLY=( $(compgen -W "$(look "$cur")" -- $cur) )
+                               COMPREPLY=( $(compgen -W "$(command look "$cur")" -- $cur) )
                        else
                                COMPREPLY=( $(compgen -W \
                                              "0 1 2 3 4 5 6 7 8 9 \
index d20726533eec47d2282f3d92295911575e75682b..b668782fbf6984bb566f98a2ed89f926464ca8a2 100644 (file)
@@ -6,12 +6,12 @@ _losetup_module()
        prev="${COMP_WORDS[COMP_CWORD-1]}"
        case $prev in
                '-d'|'--detach')
-                       ARG="$($1 --output NAME | awk '{if (1 < NR) {print}}')"
+                       ARG="$($1 --output NAME | command awk '{if (1 < NR) {print}}')"
                        COMPREPLY=( $(compgen -W "$ARG" -- $cur) )
                        return 0
                        ;;
                '-j'|'--associated')
-                       ARG="$($1 --output BACK-FILE | awk '{if (1 < NR) {print}}')"
+                       ARG="$($1 --output BACK-FILE | command awk '{if (1 < NR) {print}}')"
                        COMPREPLY=( $(compgen -W "$ARG" -- $cur) )
                        return 0
                        ;;
index 97f7d6d92a4618180cf0d987861017884608a6bb..e70a7418dd958c8f25795fe9cecb69565cace974 100644 (file)
@@ -9,7 +9,7 @@ _lslocks_module()
                        local PIDS
                        # /proc/locks can have 8 to 9 fields, see commit
                        # 55c0d16bab8cc84b72bf11cb2fdd8aa6205ac608
-                       PIDS="$(awk '{print $(NF-3)}' /proc/locks)"
+                       PIDS="$(command awk '{print $(NF-3)}' /proc/locks)"
                        COMPREPLY=( $(compgen -W "$PIDS" -- $cur) )
                        return 0
                        ;;
index 93c9773b299d8f0e0fb672d45f0dbde8c96bb408..f49d264e688157e7de60e2284afab9ea421e5565 100644 (file)
@@ -12,11 +12,11 @@ _lslogins_module()
        "
        case $prev in
                '-g'|'--groups')
-                       COMPREPLY=( $(compgen -W "$(getent group | awk -F: '{print $1}')" -- $cur) )
+                       COMPREPLY=( $(compgen -W "$(command getent group | command awk -F: '{print $1}')" -- $cur) )
                        return 0
                        ;;
                '-l'|'--logins')
-                       COMPREPLY=( $(compgen -W "$(getent passwd | awk -F: '{print $1}')" -- $cur) )
+                       COMPREPLY=( $(compgen -W "$(command getent passwd | command awk -F: '{print $1}')" -- $cur) )
                        return 0
                        ;;
                '--time-format')
index 6614884fe0e88b64b703f5906643eb0619ce3d80..46939c0102cd39ba57d9e10ba2c13d22fb02637a 100644 (file)
@@ -18,7 +18,7 @@ _mkswap_module()
                        return 0
                        ;;
                '-U'|'--uuid')
-                       COMPREPLY=( $(compgen -W "$(uuidgen -r)" -- $cur) )
+                       COMPREPLY=( $(compgen -W "$(command uuidgen -r)" -- $cur) )
                        return 0
                        ;;
                '-o'|'--offset')
index 430d61d8bc9e37648fb6f8042ade73e3def764aa..268aa3c79ae518be89b92ab21a2a181e64c118b5 100644 (file)
@@ -8,8 +8,8 @@ _mount_module()
                '-t'|'--types')
                        local prefix realcur TYPES
                        TYPES="
-                               $(\ls /lib/modules/$(uname -r)/kernel/fs | awk '{print $1, "no" $1}')
-                               $(awk '{print $NF, "no" $NF}' /proc/filesystems)
+                               $(\ls /lib/modules/$(command uname -r)/kernel/fs | command awk '{print $1, "no" $1}')
+                               $(command awk '{print $NF, "no" $NF}' /proc/filesystems)
                        "
                        realcur="${cur##*,}"
                        prefix="${cur%$realcur}"
@@ -36,7 +36,7 @@ _mount_module()
                        ;;
                '-N'|'--namespace')
                        local NAMESPACE
-                       NAMESPACE="$(lsns --type mnt --output PATH --noheadings)"
+                       NAMESPACE="$(command lsns --type mnt --output PATH --noheadings)"
                        COMPREPLY=( $(compgen -W "$NAMESPACE" -- $cur) )
                        return 0
                        ;;
index 30c9c688d32f31a81615657de8a0296c094bfc65..827cb150808592a8b10c40d6765ccaa906e8626b 100644 (file)
@@ -27,7 +27,7 @@ _partx_module()
                        return 0
                        ;;
                '-t'|'--type')
-                       COMPREPLY=( $(compgen -W "$(partx --list-types)" -- $cur) )
+                       COMPREPLY=( $(compgen -W "$(command partx --list-types)" -- $cur) )
                        return 0
                        ;;
                '-h'|'--help'|'-V'|'--version')
index 88b9ca02dc118088bfcbbc28faa30e9dd41ad8f2..20ddb9d90d90d0af9a767ae2f995213dd1498ff7 100644 (file)
@@ -7,7 +7,7 @@ _renice_module()
        case $prev in
                '-g'|'--pgrp')
                        local PGRP
-                       PGRP=$(ps -ax -opgrp | sed '1d')
+                       PGRP=$(command ps -ax -opgrp | command sed '1d')
                        COMPREPLY=( $(compgen -W "$PGRP" -- $cur) )
                        return 0
                        ;;
index d980bb45a7de9b133ba59de8df2536423b61254b..d7761dede38c5a71aed9797e39c1c56bddc17f3a 100644 (file)
@@ -17,7 +17,7 @@ _resizepart_module()
                        ;;
                2)
                        prev="${COMP_WORDS[COMP_CWORD-1]}"
-                       COMPREPLY=( $(compgen -W "$(cat /sys/block/${prev##*/}/*/partition 2>/dev/null)" -- $cur) )
+                       COMPREPLY=( $(compgen -W "$(command cat /sys/block/${prev##*/}/*/partition 2>/dev/null)" -- $cur) )
                        ;;
                3)
                        COMPREPLY="length"
index fbaafd2d7b497eaad4c0ec6a64699b41c3b0ddc1..e3a30a8f58777b48e702a59a527f38d52009f37c 100644 (file)
@@ -7,7 +7,7 @@ _rfkill_module()
        case $prev in
                'list'|'block'|'unblock'|'toggle')
                        local targets
-                       targets="$(rfkill --output=id,type --noheadings list)"
+                       targets="$(command rfkill --output=id,type --noheadings list)"
                        COMPREPLY=( $(compgen -W "all $targets" -- $cur) )
                        return 0;
                        ;;
index 026729dbbb4749d6176c4459ab62eb024459fe87..01b63e6ee2773a42673ac06d8cbfaf82e9094137 100644 (file)
@@ -18,7 +18,7 @@ _rtcwake_module()
                        return 0
                        ;;
                '-m'|'--mode')
-                       COMPREPLY=( $(compgen -W "$(rtcwake --list-modes)" -- $cur) )
+                       COMPREPLY=( $(compgen -W "$(command rtcwake --list-modes)" -- $cur) )
                        return 0
                        ;;
                '-s'|'--seconds')
index 65f9e4b1771a4c9f90072b18da9a11a99c5cbd2e..d19b275573a049d718f65422cdd0e75d5b600948 100644 (file)
@@ -9,7 +9,7 @@ _setpriv_module()
                        local prefix realcur INHERIT_ALL INHERIT
                        realcur="${cur##*,}"
                        prefix="${cur%$realcur}"
-                       INHERIT_ALL=$($1 --list-caps| awk '{print $1, "-" $1}')
+                       INHERIT_ALL=$($1 --list-caps| command awk '{print $1, "-" $1}')
                        for WORD in $INHERIT_ALL; do
                                if ! [[ $prefix == *"$WORD"* ]]; then
                                        INHERIT="$WORD ${INHERIT:-""}"
@@ -21,13 +21,13 @@ _setpriv_module()
                        ;;
                '--ruid'|'--euid'|'--reuid')
                        local UIDS
-                       UIDS=$(getent passwd | awk -F: '{print $1}')
+                       UIDS=$(command getent passwd | command awk -F: '{print $1}')
                        COMPREPLY=( $(compgen -W "$UIDS" -- $cur) )
                        return 0
                        ;;
                '--rgid'|'--egid'|'--regid')
                        local GIDS
-                       GIDS=$(getent group | awk -F: '{print $1}')
+                       GIDS=$(command getent group | command awk -F: '{print $1}')
                        COMPREPLY=( $(compgen -W "$GIDS" -- $cur) )
                        return 0
                        ;;
@@ -35,7 +35,7 @@ _setpriv_module()
                        local prefix realcur GIDS_ALL GIDS
                        realcur="${cur##*,}"
                        prefix="${cur%$realcur}"
-                       GIDS_ALL=$(getent group | awk -F: '{print $3}')
+                       GIDS_ALL=$(command getent group | command awk -F: '{print $3}')
                        for WORD in $GIDS_ALL; do
                                if ! [[ $prefix == *"$WORD"* ]]; then
                                        GIDS="$WORD ${GIDS:-""}"
index 6aa084b7f653c222a72beb01c59daa236acc39c8..21e1ca03e2ab9e6f160db5d0d9a1147d77a30b66 100644 (file)
@@ -15,7 +15,7 @@ _su_module()
                        return 0
                        ;;
                '-s'|'--shell')
-                       COMPREPLY=( $(compgen -W "$(chsh -l)" -- $cur) )
+                       COMPREPLY=( $(compgen -W "$(command chsh -l)" -- $cur) )
                        return 0
                        ;;
                '-h'|'--help'|'-V'|'--version')
index 08aa9cd79fa125a01e022a062fc47d1212211515..8be5e7739be0ddf31c2f437ce0838560ae6f8480 100644 (file)
@@ -10,7 +10,7 @@ _swaplabel_module()
                        return 0
                        ;;
                '-U'|'--uuid')
-                       COMPREPLY=( $(compgen -W '$(uuidgen)' -- $cur) )
+                       COMPREPLY=( $(compgen -W '$(command uuidgen)' -- $cur) )
                        return 0
                        ;;
                '-h'|'--help'|'-V'|'--version')
index 40dcf056940fb408caf6640baae1d19d06f773e1..9b30ac5c6acb94380a75b2144bfd5dcfb473a4d4 100644 (file)
@@ -9,11 +9,11 @@ _swapoff_module()
                        return 0
                        ;;
                '-U'|'UUID=')
-                       COMPREPLY=( $(compgen -W "$(swapon --show=UUID --noheading)" -- $cur) )
+                       COMPREPLY=( $(compgen -W "$(command swapon --show=UUID --noheading)" -- $cur) )
                        return 0
                        ;;
                '-L'|'LABEL=')
-                       COMPREPLY=( $(compgen -W "$(swapon --show=LABEL --noheading)" -- $cur) )
+                       COMPREPLY=( $(compgen -W "$(command swapon --show=LABEL --noheading)" -- $cur) )
                        return 0
                        ;;
                '-h'|'--help'|'-V'|'--version')
@@ -32,7 +32,7 @@ _swapoff_module()
                        return 0
                        ;;
        esac
-       COMPREPLY=( $(compgen -W "$(swapon --show=NAME --raw --noheading)" -- $cur) )
+       COMPREPLY=( $(compgen -W "$(command swapon --show=NAME --raw --noheading)" -- $cur) )
        return 0
 }
 complete -F _swapoff_module swapoff
index ae74fef5d5047fb7849538dfe4e74bb96e726cd4..8a32d1d96a624b9803b4d93b7d9f25222bb45a9f 100644 (file)
@@ -27,25 +27,25 @@ _swapon_module()
                        ;;
                '-U'|'UUID=')
                        local UUIDS
-                       UUIDS="$(command lsblk -nrp -o FSTYPE,UUID | awk '$1 ~ /swap/ { print $2 }')"
+                       UUIDS="$(command lsblk -nrp -o FSTYPE,UUID | command awk '$1 ~ /swap/ { print $2 }')"
                        COMPREPLY=( $(compgen -W "$UUIDS" -- $cur) )
                        return 0
                        ;;
                '-L'|'LABEL=')
                        local LABELS
-                       LABELS="$(command lsblk -nrp -o FSTYPE,LABEL | awk '$1 ~ /swap/ { print $2 }')"
+                       LABELS="$(command lsblk -nrp -o FSTYPE,LABEL | command awk '$1 ~ /swap/ { print $2 }')"
                        COMPREPLY=( $(compgen -W "$LABELS" -- $cur) )
                        return 0
                        ;;
                'PARTUUID=')
                        local PARTUUIDS
-                       PARTUUIDS="$(command lsblk -nrp -o FSTYPE,PARTUUID | awk '$1 ~ /swap/ { print $2 }')"
+                       PARTUUIDS="$(command lsblk -nrp -o FSTYPE,PARTUUID | command awk '$1 ~ /swap/ { print $2 }')"
                        COMPREPLY=( $(compgen -W "$PARTUUIDS" -- $cur) )
                        return 0
                        ;;
                'PARTLABEL=')
                        local PARTLABELS
-                       PARTLABELS="$(command lsblk -nrp -o FSTYPE,PARTLABEL | awk '$1 ~ /swap/ { print $2 }')"
+                       PARTLABELS="$(command lsblk -nrp -o FSTYPE,PARTLABEL | command awk '$1 ~ /swap/ { print $2 }')"
                        COMPREPLY=( $(compgen -W "$PARTLABELS" -- $cur) )
                        return 0
                        ;;
@@ -77,7 +77,7 @@ _swapon_module()
                        ;;
        esac
        local DEVS
-       DEVS="$(command lsblk -nrp -o FSTYPE,NAME | awk '$1 ~ /swap/ { print $2 }')"
+       DEVS="$(command lsblk -nrp -o FSTYPE,NAME | command awk '$1 ~ /swap/ { print $2 }')"
        compopt -o nospace
        COMPREPLY=( $(compgen -fW "$DEVS LABEL= UUID= PARTLABEL= PARTUUID=" -- $cur) )
        return 0
index 407edc4edca7b0856535fc8815e135bd65d75dc1..30cfc1c3a22bf508c12f196bdedfe25ea5654c0b 100644 (file)
@@ -9,7 +9,7 @@ _taskset_module()
                        local prefix realcur CPULIST_ALL CPULIST
                        realcur="${cur##*,}"
                        prefix="${cur%$realcur}"
-                       CPULIST_ALL=$(sed 's/^/{/; s/-/../g; s/,/} {/g; s/$/}/' /sys/devices/system/cpu/online)
+                       CPULIST_ALL=$(command sed 's/^/{/; s/-/../g; s/,/} {/g; s/$/}/' /sys/devices/system/cpu/online)
                        for WORD in $(eval echo $CPULIST_ALL); do
                                if ! [[ $prefix == *"$WORD"* ]]; then
                                        CPULIST="$WORD ${CPULIST:-""}"
index 7650358ddd1032d7fa3a55be09228e5551a283ea..3b358d0fcd4df23d08635f3941af450f2d18e844 100644 (file)
@@ -3,7 +3,7 @@ _umount_points_list()
        # List of characters to escape shamelessly stolen from "scp" completion
        local escape_chars='[][(){}<>\",:;^&!$=?`|\\'\'' \t\f\n\r\v]'
 
-       findmnt -lno TARGET | awk '
+       command findmnt -lno TARGET | command awk '
 
        function literal_ere(s) {
                gsub(/[][^$.*?+{}\\()|]/, "\\\\&", s)
@@ -42,8 +42,8 @@ _umount_module()
                '-t'|'--types')
                        local TYPES
                        TYPES="
-                               $(\ls /lib/modules/$(uname -r)/kernel/fs | awk '{print $1, "no" $1}')
-                               $(awk '{print $NF, "no" $NF}' /proc/filesystems)
+                               $(\ls /lib/modules/$(command uname -r)/kernel/fs | command awk '{print $1, "no" $1}')
+                               $(command awk '{print $NF, "no" $NF}' /proc/filesystems)
                        "
                        COMPREPLY=( $(compgen -W "$TYPES" -- $cur) )
                        return 0
@@ -53,7 +53,7 @@ _umount_module()
                        ;;
                '-N'|'--namespace')
                        local NAMESPACE
-                       NAMESPACE="$(lsns --type mnt --output PATH --noheadings)"
+                       NAMESPACE="$(command lsns --type mnt --output PATH --noheadings)"
                        COMPREPLY=( $(compgen -W "$NAMESPACE" -- $cur) )
                        return 0
                        ;;
index 4c1fb4af700a26a3136723c3d22585a500158013..11f9c9daf7e10b2609fc9c07a91e56fbf175cf71 100644 (file)
@@ -29,7 +29,7 @@ _wipefs_module()
                        ;;
                '-t'|'--types')
                        local TYPES
-                       TYPES="$(blkid -k)"
+                       TYPES="$(command blkid -k)"
                        COMPREPLY=( $(compgen -W "$TYPES" -- $cur) )
                        return 0
                        ;;
index 7b2d2fae3f352123e4b806d30121d5c36fb1a24f..529ec0ad27ce1dac83a218ae4c1f9cd6c9d222ef 100644 (file)
@@ -11,11 +11,11 @@ _write_module()
        esac
        case $COMP_CWORD in
                1)
-                       COMPREPLY=( $(compgen -W '$(users)' -- $cur) )
+                       COMPREPLY=( $(compgen -W '$(command users)' -- $cur) )
                        return 0
                        ;;
                2)
-                       COMPREPLY=( $(compgen -W "$(w -h $prev | awk '{print $2}')" -- $cur) )
+                       COMPREPLY=( $(compgen -W "$(command w -h $prev | command awk '{print $2}')" -- $cur) )
                        return 0
                        ;;
        esac