5 cur="${COMP_WORDS[COMP_CWORD]}"
6 prev="${COMP_WORDS[COMP_CWORD-1]}"
9 local prefix realcur OUTPUT_ALL OUTPUT
11 prefix="${cur%$realcur}"
12 OUTPUT_ALL="UUID LABEL LENGTH TYPE OFFSET USAGE DEVICE"
13 for WORD in $OUTPUT_ALL; do
14 if ! [[ $prefix == *"$WORD"* ]]; then
15 OUTPUT="$WORD ${OUTPUT:-""}"
19 COMPREPLY=( $(compgen -P "$prefix" -W "$OUTPUT" -S ',' -- $realcur) )
23 COMPREPLY=( $(compgen -W "offset" -- $cur) )
29 COMPREPLY=( $(compgen -W "$TYPES" -- $cur) )
32 '-h'|'--help'|'-V'|'--version')
53 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
57 COMPREPLY=( $(compgen -W "$(lsblk -pnro name)" -- $cur) )
60 complete -F _wipefs_module wipefs