ssh-add: New completion.
This commit is contained in:
parent
3ccfe020a2
commit
28f15fd05c
@ -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
23
completions/ssh-add
Normal 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
|
1
test/completion/ssh-add.exp
Normal file
1
test/completion/ssh-add.exp
Normal file
@ -0,0 +1 @@
|
|||||||
|
assert_source_completions ssh-add
|
20
test/lib/completions/ssh-add.exp
Normal file
20
test/lib/completions/ssh-add.exp
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
proc setup {} {
|
||||||
|
save_env
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
proc teardown {} {
|
||||||
|
assert_env_unmodified
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
setup
|
||||||
|
|
||||||
|
|
||||||
|
assert_complete_any "ssh-add "
|
||||||
|
|
||||||
|
|
||||||
|
sync_after_int
|
||||||
|
|
||||||
|
|
||||||
|
teardown
|
Loading…
x
Reference in New Issue
Block a user