ssh-add: New completion.

This commit is contained in:
Ville Skyttä 2012-01-07 09:42:53 +02:00
parent 3ccfe020a2
commit 28f15fd05c
4 changed files with 45 additions and 0 deletions

View File

@ -284,6 +284,7 @@ bashcomp_DATA = a2x \
snownews \ snownews \
sqlite3 \ sqlite3 \
ssh \ ssh \
ssh-add \
ssh-copy-id \ ssh-copy-id \
sshfs \ sshfs \
sshmitm \ sshmitm \

23
completions/ssh-add Normal file
View File

@ -0,0 +1,23 @@
# ssh-add(1) completion -*- shell-script -*-
_ssh_add()
{
local cur prev words cword
_init_completion || return
case $prev in
-t|-s|-e)
return
;;
esac
if [[ $cur == -* ]]; then
COMPREPLY=( $( compgen -W '$( _parse_help "$1" -? )' -- "$cur" ) )
return
fi
_filedir
} &&
complete -F _ssh_add ssh-add
# ex: ts=4 sw=4 et filetype=sh

View File

@ -0,0 +1 @@
assert_source_completions ssh-add

View File

@ -0,0 +1,20 @@
proc setup {} {
save_env
}
proc teardown {} {
assert_env_unmodified
}
setup
assert_complete_any "ssh-add "
sync_after_int
teardown