[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.90-121-g6943138
Ville Skyttä
ville.skytta at iki.fi
Sun Jan 8 14:45:03 UTC 2012
The following commit has been merged in the master branch:
commit 694313874a8ef025c5bbbf2a57de058fb684e9b9
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Sun Jan 8 16:44:53 2012 +0200
pwd: New completion.
diff --git a/completions/Makefile.am b/completions/Makefile.am
index 4773a72..7385e44 100644
--- a/completions/Makefile.am
+++ b/completions/Makefile.am
@@ -243,6 +243,7 @@ bashcomp_DATA = a2x \
psql \
puppet \
pwck \
+ pwd \
pwdx \
pwgen \
python \
diff --git a/completions/desktop-file-validate b/completions/pwd
similarity index 56%
copy from completions/desktop-file-validate
copy to completions/pwd
index faae6c3..8818b49 100644
--- a/completions/desktop-file-validate
+++ b/completions/pwd
@@ -1,23 +1,22 @@
-# desktop-file-validate completion -*- shell-script -*-
+# pwd(1) completion -*- shell-script -*-
-_desktop_file_validate()
+_pwd()
{
local cur prev words cword
_init_completion || return
case $prev in
- --help)
+ --help|--version)
return
;;
esac
if [[ $cur == -* ]]; then
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
- return
+ [[ $COMPREPLY ]] || \
+ COMPREPLY=( $( compgen -W '$( _parse_usage "$1" )' -- "$cur" ) )
fi
-
- _filedir desktop
} &&
-complete -F _desktop_file_validate desktop-file-validate
+complete -F _pwd pwd
# ex: ts=4 sw=4 et filetype=sh
diff --git a/test/completion/pwd.exp b/test/completion/pwd.exp
new file mode 100644
index 0000000..e24ee97
--- /dev/null
+++ b/test/completion/pwd.exp
@@ -0,0 +1 @@
+assert_source_completions pwd
diff --git a/test/lib/completions/bk.exp b/test/lib/completions/pwd.exp
similarity index 80%
copy from test/lib/completions/bk.exp
copy to test/lib/completions/pwd.exp
index b652e6b..f40fdb9 100644
--- a/test/lib/completions/bk.exp
+++ b/test/lib/completions/pwd.exp
@@ -11,9 +11,7 @@ proc teardown {} {
setup
-assert_complete_any "bk "
-
-
+assert_no_complete "pwd "
sync_after_int
--
bash-completion
More information about the Bash-completion-commits
mailing list