pwd: New completion.
This commit is contained in:
parent
5eaf276b5f
commit
694313874a
@ -243,6 +243,7 @@ bashcomp_DATA = a2x \
|
||||
psql \
|
||||
puppet \
|
||||
pwck \
|
||||
pwd \
|
||||
pwdx \
|
||||
pwgen \
|
||||
python \
|
||||
|
22
completions/pwd
Normal file
22
completions/pwd
Normal file
@ -0,0 +1,22 @@
|
||||
# pwd(1) completion -*- shell-script -*-
|
||||
|
||||
_pwd()
|
||||
{
|
||||
local cur prev words cword
|
||||
_init_completion || return
|
||||
|
||||
case $prev in
|
||||
--help|--version)
|
||||
return
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ $cur == -* ]]; then
|
||||
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
||||
[[ $COMPREPLY ]] || \
|
||||
COMPREPLY=( $( compgen -W '$( _parse_usage "$1" )' -- "$cur" ) )
|
||||
fi
|
||||
} &&
|
||||
complete -F _pwd pwd
|
||||
|
||||
# ex: ts=4 sw=4 et filetype=sh
|
1
test/completion/pwd.exp
Normal file
1
test/completion/pwd.exp
Normal file
@ -0,0 +1 @@
|
||||
assert_source_completions pwd
|
18
test/lib/completions/pwd.exp
Normal file
18
test/lib/completions/pwd.exp
Normal file
@ -0,0 +1,18 @@
|
||||
proc setup {} {
|
||||
save_env
|
||||
}
|
||||
|
||||
|
||||
proc teardown {} {
|
||||
assert_env_unmodified
|
||||
}
|
||||
|
||||
|
||||
setup
|
||||
|
||||
|
||||
assert_no_complete "pwd "
|
||||
sync_after_int
|
||||
|
||||
|
||||
teardown
|
Loading…
x
Reference in New Issue
Block a user