pwd: New completion.

This commit is contained in:
Ville Skyttä 2012-01-08 16:44:53 +02:00
parent 5eaf276b5f
commit 694313874a
4 changed files with 42 additions and 0 deletions

View File

@ -243,6 +243,7 @@ bashcomp_DATA = a2x \
psql \
puppet \
pwck \
pwd \
pwdx \
pwgen \
python \

22
completions/pwd Normal file
View 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
View File

@ -0,0 +1 @@
assert_source_completions pwd

View File

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