[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.3-29-ga6354b8
Ville Skyttä
ville.skytta at iki.fi
Sat Mar 12 10:04:29 UTC 2011
The following commit has been merged in the master branch:
commit a6354b810727b71b4e541e94ef0447433c70bf9d
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Sat Mar 12 12:04:02 2011 +0200
Add reptyr completion.
diff --git a/CHANGES b/CHANGES
index fd0937c..eedac4e 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,7 @@
bash-completion (2.x)
[ Ville Skyttä ]
+ * Add reptyr completion.
* Improve aspell, gendiff, and smartctl completions.
* Try harder to find the correct perl executable to run the perl helper with.
* Drop rpm query support for rpm < 4.1.
diff --git a/completions/Makefile.am b/completions/Makefile.am
index e7e86d8..1a92e1d 100644
--- a/completions/Makefile.am
+++ b/completions/Makefile.am
@@ -127,6 +127,7 @@ bashcomp_DATA = abook \
quota-tools \
rcs \
rdesktop \
+ reptyr \
reportbug \
resolvconf \
rfkill \
diff --git a/completions/xmodmap b/completions/reptyr
similarity index 53%
copy from completions/xmodmap
copy to completions/reptyr
index cde9e7e..071fddd 100644
--- a/completions/xmodmap
+++ b/completions/reptyr
@@ -1,27 +1,27 @@
-# xmodmap(1) completion
+# bash completion for reptyr(1)
-have xmodmap &&
-_xmodmap()
+have reptyr &&
+_reptyr()
{
- COMPREPLY=()
local cur prev
+
+ COMPREPLY=()
_get_comp_words_by_ref cur prev
case $prev in
- -display|-e)
+ -l)
return 0
;;
esac
- if [[ "$cur" == -* ]]; then
- COMPREPLY=( $( compgen -W '-display -help -grammar -verbose -quiet -n
- -e -pm -pk -pke -pp' -- "$cur" ) )
+ if [[ $cur == -* ]]; then
+ COMPREPLY=( $( compgen -W '-l -s' -- "$cur" ) )
return 0
fi
- _filedir
+ [[ $prev != +([0-9]) ]] && _pids
} &&
-complete -F _xmodmap xmodmap
+complete -F _reptyr reptyr
# Local variables:
# mode: shell-script
diff --git a/test/completion/reptyr.exp b/test/completion/reptyr.exp
new file mode 100644
index 0000000..62ab427
--- /dev/null
+++ b/test/completion/reptyr.exp
@@ -0,0 +1 @@
+assert_source_completions reptyr
diff --git a/test/lib/completions/python.exp b/test/lib/completions/reptyr.exp
similarity index 68%
copy from test/lib/completions/python.exp
copy to test/lib/completions/reptyr.exp
index 446e3d0..35ccb91 100644
--- a/test/lib/completions/python.exp
+++ b/test/lib/completions/reptyr.exp
@@ -11,10 +11,11 @@ proc teardown {} {
setup
-assert_complete_any "python "
+assert_complete_any "reptyr -"
sync_after_int
-assert_complete_any "python -"
+
+assert_complete_any "reptyr "
sync_after_int
--
bash-completion
More information about the Bash-completion-commits
mailing list