mirror of
https://github.com/ericonr/util-linux.git
synced 2024-04-21 09:12:35 -05:00
c6b1d511d2
fincore: Add RES column to --output completions. Commit:e4e8b57be2
findfs: Commit:940817b736
logger: Add --socket-errors [1] and --tcp [2] options. Commit [1]:d77dc29e6e
Commit [2]:68265d070d
lsblk: Add HOTPLUG [1], SERIAL [2], and SUBSYSTEMS [3] output fields. Add --json [4], --output-all [5], and --paths [6] options. Commit [1]:483987c275
Commit [2]:460c7afb79
Commit [3]:7f14ee1b55
Commit [4]:4a102a4871
Commit [5]:1b4d2a4a4a
Commit [6]:c7e76cd145
lslocks: Add --noinaccessible option. Remove file argument completion, this command does not use that sort of command line input. Commit:f29bc6e1cc
mcookie: Add --max-size option. Commit:f7bac5731b
wipefs: Add --backup option. Commit:7e658c15a2
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
35 lines
695 B
Plaintext
35 lines
695 B
Plaintext
_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
|