File tree 5 files changed +56
-0
lines changed
5 files changed +56
-0
lines changed Original file line number Diff line number Diff line change @@ -394,6 +394,7 @@ bashcomp_DATA = 2to3 \
394
394
ssh-add \
395
395
ssh-copy-id \
396
396
ssh-keygen \
397
+ ssh-keyscan \
397
398
sshfs \
398
399
sshmitm \
399
400
sshow \
Original file line number Diff line number Diff line change
1
+ # ssh-keyscan(1) completion -*- shell-script -*-
2
+
3
+ _comp_cmd_ssh_keyscan ()
4
+ {
5
+ local cur prev words cword
6
+ _init_completion || return
7
+
8
+ local ipvx
9
+
10
+ case $prev in
11
+ -* 4* )
12
+ ipvx=-4
13
+ ;;
14
+ -* 6* )
15
+ ipvx=-6
16
+ ;;
17
+ -* f)
18
+ _filedir
19
+ return
20
+ ;;
21
+ -* p | -* T)
22
+ return
23
+ ;;
24
+ -* t)
25
+ COMPREPLY=($( compgen -W ' dsa ecdsa ed25519 rsa' -- " $cur " ) )
26
+ return
27
+ ;;
28
+ esac
29
+
30
+ if [[ $cur == -* ]]; then
31
+ COMPREPLY=($( compgen -W ' $(_parse_usage "$1")' -- " $cur " ) )
32
+ return
33
+ fi
34
+
35
+ _known_hosts_real ${ipvx-} -- " $cur "
36
+ } &&
37
+ complete -F _comp_cmd_ssh_keyscan ssh-keyscan
38
+
39
+ # ex: filetype=sh
Original file line number Diff line number Diff line change @@ -573,6 +573,7 @@ EXTRA_DIST = \
573
573
test_ssh_add.py \
574
574
test_ssh_copy_id.py \
575
575
test_ssh_keygen.py \
576
+ test_ssh_keyscan.py \
576
577
test_sshfs.py \
577
578
test_sshmitm.py \
578
579
test_sshow.py \
Original file line number Diff line number Diff line change
1
+ import pytest
2
+
3
+
4
+ @pytest .mark .bashcomp (
5
+ cmd = "ssh-keyscan" ,
6
+ )
7
+ class TestSshKeyscan :
8
+ @pytest .mark .complete ("ssh-keyscan " )
9
+ def test_basic (self , completion ):
10
+ assert completion
11
+
12
+ @pytest .mark .complete ("ssh-keyscan -" , require_cmd = True )
13
+ def test_options (self , completion ):
14
+ assert completion
Original file line number Diff line number Diff line change 351
351
ssh-add
352
352
ssh-copy-id
353
353
ssh-keygen
354
+ ssh-keyscan
354
355
sshmitm
355
356
sshow
356
357
strace
You can’t perform that action at this time.
0 commit comments