5 cur="${COMP_WORDS[COMP_CWORD]}"
6 prev="${COMP_WORDS[COMP_CWORD-1]}"
8 '-a'|'--auto'|'-i'|'--manualeject')
9 COMPREPLY=( $(compgen -W "off on" -- $cur) )
13 # FIXME: there must be way to determine slots
14 COMPREPLY=( $(compgen -W "slot" -- $cur) )
18 COMPREPLY=( $(compgen -W "$(eject --listspeed 2>/dev/null)" -- $cur) )
21 '-h'|'--help'|'-V'|'--version')
34 --no-partitions-unmount
47 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
52 DEVS="$(for I in /sys/class/block/*/removable; do
53 if [ $(cat $I) -ne 0 ]; then
61 compopt -o bashdefault -o default
62 COMPREPLY=( $(compgen -W "$DEVS" $cur) )
65 complete -F _eject_module eject