mussh: New completion.

master
Ville Skyttä 2012-07-21 13:05:15 +03:00
parent 9f0a6e45f8
commit 882d527237
4 changed files with 72 additions and 0 deletions

View File

@ -208,6 +208,7 @@ bashcomp_DATA = a2x \
munin-node-configure \
munin-run \
munin-update \
mussh \
mutt \
mysql \
mysqladmin \

52
completions/mussh Normal file
View File

@ -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

View File

@ -0,0 +1 @@
assert_source_completions mussh

View File

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