[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 2.0-15-g882d527
Ville Skyttä
ville.skytta at iki.fi
Sat Jul 21 10:05:26 UTC 2012
The following commit has been merged in the master branch:
commit 882d527237c77cdc757672affa070bb1b150b778
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Sat Jul 21 13:05:15 2012 +0300
mussh: New completion.
diff --git a/completions/Makefile.am b/completions/Makefile.am
index b6895d2..02f239c 100644
--- a/completions/Makefile.am
+++ b/completions/Makefile.am
@@ -208,6 +208,7 @@ bashcomp_DATA = a2x \
munin-node-configure \
munin-run \
munin-update \
+ mussh \
mutt \
mysql \
mysqladmin \
diff --git a/completions/mussh b/completions/mussh
new file mode 100644
index 0000000..a7bf299
--- /dev/null
+++ b/completions/mussh
@@ -0,0 +1,52 @@
+# mussh(1) completion -*- shell-script -*-
+
+_mussh()
+{
+ local cur prev words cword
+ _init_completion || return
+
+ case $prev in
+ --help|-V|-m|-t)
+ return
+ ;;
+ -d)
+ COMPREPLY=( $( compgen -W '{0..2}' -- "$cur" ) )
+ return
+ ;;
+ -v)
+ COMPREPLY=( $( compgen -W '{0..3}' -- "$cur" ) )
+ return
+ ;;
+ -i|-H|-C)
+ _filedir
+ return
+ ;;
+ -o|-po)
+ _xfunc ssh _ssh_options
+ return
+ ;;
+ -l|-L)
+ COMPREPLY=( $( compgen -u -- "$cur" ) )
+ return
+ ;;
+ -s)
+ _shells
+ return
+ ;;
+ -p|-h)
+ [[ $cur == *@* ]] && _user_at_host || _known_hosts_real -a "$cur"
+ return
+ ;;
+ -c)
+ compopt -o filenames
+ COMPREPLY+=( $( compgen -c -- "$cur" ) )
+ return
+ ;;
+ esac
+
+ [[ $cur != -* ]] || \
+ COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
+} &&
+complete -F _mussh mussh
+
+# ex: ts=4 sw=4 et filetype=sh
diff --git a/test/completion/mussh.exp b/test/completion/mussh.exp
new file mode 100644
index 0000000..1232287
--- /dev/null
+++ b/test/completion/mussh.exp
@@ -0,0 +1 @@
+assert_source_completions mussh
diff --git a/test/lib/completions/awk.exp b/test/lib/completions/mussh.exp
similarity index 79%
copy from test/lib/completions/awk.exp
copy to test/lib/completions/mussh.exp
index 260dabc..24c5c1f 100644
--- a/test/lib/completions/awk.exp
+++ b/test/lib/completions/mussh.exp
@@ -11,9 +11,7 @@ proc teardown {} {
setup
-assert_complete_any "awk "
-
-
+assert_complete_any "mussh -"
sync_after_int
--
bash-completion
More information about the Bash-completion-commits
mailing list