diff options
Diffstat (limited to 'bash-completion')
-rw-r--r-- | bash-completion/Makemodule.am | 3 | ||||
-rw-r--r-- | bash-completion/fincore | 2 | ||||
-rw-r--r-- | bash-completion/findfs | 34 | ||||
-rw-r--r-- | bash-completion/logger | 6 | ||||
-rw-r--r-- | bash-completion/lsblk | 20 | ||||
-rw-r--r-- | bash-completion/lslocks | 30 | ||||
-rw-r--r-- | bash-completion/mcookie | 6 | ||||
-rw-r--r-- | bash-completion/wipefs | 13 |
8 files changed, 85 insertions, 29 deletions
diff --git a/bash-completion/Makemodule.am b/bash-completion/Makemodule.am index 6885ae91c..d94b995dc 100644 --- a/bash-completion/Makemodule.am +++ b/bash-completion/Makemodule.am @@ -21,6 +21,9 @@ endif if BUILD_FINCORE dist_bashcompletion_DATA += bash-completion/fincore endif +if BUILD_FINDFS +dist_bashcompletion_DATA += bash-completion/findfs +endif if BUILD_FINDMNT dist_bashcompletion_DATA += bash-completion/findmnt endif diff --git a/bash-completion/fincore b/bash-completion/fincore index 9b1aed8f3..4988f198b 100644 --- a/bash-completion/fincore +++ b/bash-completion/fincore @@ -9,7 +9,7 @@ _fincore_module() local prefix realcur OUTPUT_ALL OUTPUT realcur="${cur##*,}" prefix="${cur%$realcur}" - OUTPUT_ALL='PAGES SIZE FILE' + OUTPUT_ALL='PAGES SIZE FILE RES' for WORD in $OUTPUT_ALL; do if ! [[ $prefix == *"$WORD"* ]]; then OUTPUT="$WORD $OUTPUT" diff --git a/bash-completion/findfs b/bash-completion/findfs new file mode 100644 index 000000000..5297b863f --- /dev/null +++ b/bash-completion/findfs @@ -0,0 +1,34 @@ +_findfs_module() +{ + local cur prev OPTS findable + 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="--version --help" + COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) ) + return 0 + ;; + esac + for i in $(lsblk -rpno label); do + findable+=" LABEL=$i" + done + for i in $(lsblk -rpno uuid); do + findable+=" UUID=$i" + done + for i in $(lsblk -rpno partlabel); do + findable+=" PARTLABEL=$i" + done + for i in $(lsblk -rpno partuuid); do + findable+=" PARTUUID=$i" + done + COMPREPLY=( $(compgen -W "$findable" -- $cur) ) + return 0 +} +complete -F _findfs_module findfs diff --git a/bash-completion/logger b/bash-completion/logger index 7f7f086ca..7fb95652f 100644 --- a/bash-completion/logger +++ b/bash-completion/logger @@ -31,6 +31,10 @@ _logger_module() COMPREPLY=( $(compgen -W "$(awk '$NF ~ /^\// {print $NF}' /proc/net/unix)" -- $cur) ) return 0 ;; + '--socket-errors') + COMPREPLY=( $(compgen -W "on off auto" -- $cur) ) + return 0 + ;; '--msgid') COMPREPLY=( $(compgen -W "msgid" -- $cur) ) return 0 @@ -58,8 +62,10 @@ _logger_module() --size --skip-empty --socket + --socket-errors --stderr --tag + --tcp --udp --version " diff --git a/bash-completion/lsblk b/bash-completion/lsblk index e32f37100..4fef8fc84 100644 --- a/bash-completion/lsblk +++ b/bash-completion/lsblk @@ -1,18 +1,17 @@ _lsblk_module() { - local cur prev OPTS + local cur prev OPTS LSBLK_COLS_ALL COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" prev="${COMP_WORDS[COMP_CWORD-1]}" - LSBLK_COLS_ALL="NAME KNAME MAJ:MIN FSTYPE MOUNTPOINT - LABEL UUID PARTTYPE PARTLABEL PARTUUID PARTFLAGS - RA RO RM - MODEL SIZE STATE OWNER GROUP MODE - ALIGNMENT MIN-IO OPT-IO PHY-SEC LOG-SEC - ROTA SCHED RQ-SIZE TYPE DISC-ALN - DISC-GRAN DISC-MAX DISC-ZERO WSAME WWN - RAND PKNAME HCTL TRAN REV VENDOR" + LSBLK_COLS_ALL=" + NAME KNAME MAJ:MIN FSTYPE MOUNTPOINT LABEL UUID PARTTYPE + PARTLABEL PARTUUID PARTFLAGS RA RO RM HOTPLUG MODEL SERIAL SIZE + STATE OWNER GROUP MODE ALIGNMENT MIN-IO OPT-IO PHY-SEC LOG-SEC + ROTA SCHED RQ-SIZE TYPE DISC-ALN DISC-GRAN DISC-MAX DISC-ZERO + WSAME WWN RAND PKNAME HCTL TRAN SUBSYSTEMS REV VENDOR + " case $prev in '-e'|'--exclude'|'-I'|'--include') @@ -64,11 +63,14 @@ _lsblk_module() --fs --help --include + --json --ascii --list --perms --noheadings --output + --output-all + --paths --pairs --raw --inverse diff --git a/bash-completion/lslocks b/bash-completion/lslocks index 0fd0acd00..4ca1e6b6e 100644 --- a/bash-completion/lslocks +++ b/bash-completion/lslocks @@ -31,23 +31,19 @@ _lslocks_module() return 0 ;; esac - case $cur in - -*) - OPTS="--pid - --json - --output - --noheadings - --raw - --notruncate - --help - --version" - COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) ) - return 0 - ;; - esac - local IFS=$'\n' - compopt -o filenames - COMPREPLY=( $(compgen -f -- $cur) ) + OPTS=" + --json + --noinaccessible + --noheadings + --output + --pid + --raw + --notruncate + --help + --version + " + COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) ) return 0 + } complete -F _lslocks_module lslocks diff --git a/bash-completion/mcookie b/bash-completion/mcookie index 4345b6e6c..041582ffc 100644 --- a/bash-completion/mcookie +++ b/bash-completion/mcookie @@ -11,13 +11,17 @@ _mcookie_module() COMPREPLY=( $(compgen -f -- $cur) ) return 0 ;; + '-m'|'--max-size') + COMPREPLY=( $(compgen -W "bytes" -- $cur) ) + return 0 + ;; '-h'|'--help'|'-V'|'--version') return 0 ;; esac case $cur in -*) - OPTS="--file --verbose --version --help" + OPTS="--file --max-size --verbose --version --help" COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) ) return 0 ;; diff --git a/bash-completion/wipefs b/bash-completion/wipefs index d735b5ac7..577819182 100644 --- a/bash-completion/wipefs +++ b/bash-completion/wipefs @@ -21,7 +21,18 @@ _wipefs_module() esac case $cur in -*) - OPTS="--all --force --help --no-act --offset --parsable --quiet --types --version" + OPTS=" + --all + --backup + --force + --help + --no-act + --offset + --parsable + --quiet + --types + --version + " COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) ) return 0 ;; |