prefix="${cur%$realcur}"
for WORD in $OUTPUT_ALL; do
if ! [[ $prefix == *"$WORD"* ]]; then
- OUTPUT="$WORD $OUTPUT"
+ OUTPUT="$WORD ${OUTPUT:-""}"
fi
done
compopt -o nospace
return 0
;;
'-t'|'--type')
- # FIXME: some command should list type libblkid knows.
- COMPREPLY=( $(compgen -W "aix bsd dos gpt mac minix PMBR sgi solaris sun ultrix unixware" -- $cur) )
+ COMPREPLY=( $(compgen -W "$(partx --list-types)" -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
--noheadings
--nr
--output
+ --output-all
--pairs
--raw
--sector-size
--type
+ --list-types
--verbose
--help
--version
return 0
;;
esac
+ compopt -o bashdefault -o default
COMPREPLY=( $(compgen -W "$(lsblk -pnro name)" -- $cur) )
return 0
}