xxd: New completion.

master
Ville Skyttä 2013-03-06 18:22:14 +02:00
parent 552a2f2a94
commit e38e68f96c
4 changed files with 43 additions and 0 deletions

View File

@ -370,6 +370,7 @@ bashcomp_DATA = a2x \
xrandr \
xrdb \
xsltproc \
xxd \
xz \
xzdec \
ypmatch \

23
completions/xxd Normal file
View File

@ -0,0 +1,23 @@
# xxd(1) completion -*- shell-script -*-
_xxd()
{
local cur prev words cword
_init_completion || return
case $prev in
-h|-help|-c|-cols|-g|-groupsize|-l|-len|-s|-seek|-v|-version)
return
;;
esac
if [[ $cur == -* ]]; then
COMPREPLY=( $( compgen -W '$( _parse_help "$1" -h )' -- "$cur" ) )
return
fi
_filedir
} &&
complete -F _xxd xxd
# ex: ts=4 sw=4 et filetype=sh

1
test/completion/xxd.exp Normal file
View File

@ -0,0 +1 @@
assert_source_completions xxd

View File

@ -0,0 +1,18 @@
proc setup {} {
save_env
}
proc teardown {} {
assert_env_unmodified
}
setup
assert_complete_any "xxd "
sync_after_int
teardown