bash-completion/completions/dd

31 lines
787 B
Plaintext
Raw Normal View History

# bash completion for dd -*- shell-script -*-
2009-05-17 13:10:01 -07:00
_dd()
{
local cur prev words cword
_init_completion -n = || return
2009-05-17 13:10:01 -07:00
case $cur in
2010-10-24 02:37:22 -07:00
if=*|of=*)
cur=${cur#*=}
_filedir
return 0
;;
conv=*)
cur=${cur#*=}
COMPREPLY=( $( compgen -W 'ascii ebcdic ibm block unblock lcase
notrunc ucase swab noerror sync' -- "$cur" ) )
return 0
;;
2009-10-04 10:42:50 -07:00
esac
2009-05-17 13:10:01 -07:00
2009-10-04 10:42:50 -07:00
_expand || return 0
2009-05-17 13:10:01 -07:00
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) \
2010-10-24 02:37:22 -07:00
$( compgen -W 'bs cbs conv count ibs if obs of seek skip' \
-S '=' -- "$cur" ) )
2009-05-17 13:10:01 -07:00
} &&
complete -F _dd -o nospace dd
2009-10-04 10:42:50 -07:00
# ex: ts=4 sw=4 et filetype=sh