mussh: New completion.
This commit is contained in:
parent
9f0a6e45f8
commit
882d527237
@ -208,6 +208,7 @@ bashcomp_DATA = a2x \
|
|||||||
munin-node-configure \
|
munin-node-configure \
|
||||||
munin-run \
|
munin-run \
|
||||||
munin-update \
|
munin-update \
|
||||||
|
mussh \
|
||||||
mutt \
|
mutt \
|
||||||
mysql \
|
mysql \
|
||||||
mysqladmin \
|
mysqladmin \
|
||||||
|
52
completions/mussh
Normal file
52
completions/mussh
Normal 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
|
1
test/completion/mussh.exp
Normal file
1
test/completion/mussh.exp
Normal file
@ -0,0 +1 @@
|
|||||||
|
assert_source_completions mussh
|
18
test/lib/completions/mussh.exp
Normal file
18
test/lib/completions/mussh.exp
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
proc setup {} {
|
||||||
|
save_env
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
proc teardown {} {
|
||||||
|
assert_env_unmodified
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
setup
|
||||||
|
|
||||||
|
|
||||||
|
assert_complete_any "mussh -"
|
||||||
|
sync_after_int
|
||||||
|
|
||||||
|
|
||||||
|
teardown
|
Loading…
x
Reference in New Issue
Block a user