xxd: New completion.
This commit is contained in:
parent
552a2f2a94
commit
e38e68f96c
@ -370,6 +370,7 @@ bashcomp_DATA = a2x \
|
|||||||
xrandr \
|
xrandr \
|
||||||
xrdb \
|
xrdb \
|
||||||
xsltproc \
|
xsltproc \
|
||||||
|
xxd \
|
||||||
xz \
|
xz \
|
||||||
xzdec \
|
xzdec \
|
||||||
ypmatch \
|
ypmatch \
|
||||||
|
23
completions/xxd
Normal file
23
completions/xxd
Normal 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
1
test/completion/xxd.exp
Normal file
@ -0,0 +1 @@
|
|||||||
|
assert_source_completions xxd
|
18
test/lib/completions/xxd.exp
Normal file
18
test/lib/completions/xxd.exp
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
proc setup {} {
|
||||||
|
save_env
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
proc teardown {} {
|
||||||
|
assert_env_unmodified
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
setup
|
||||||
|
|
||||||
|
|
||||||
|
assert_complete_any "xxd "
|
||||||
|
sync_after_int
|
||||||
|
|
||||||
|
|
||||||
|
teardown
|
Loading…
x
Reference in New Issue
Block a user