File tree Expand file tree Collapse file tree 2 files changed +27
-3
lines changed Expand file tree Collapse file tree 2 files changed +27
-3
lines changed Original file line number Diff line number Diff line change @@ -66,11 +66,12 @@ _ssh_keygen()
6666 no-x11-forwarding permit-agent-forwarding
6767 permit-port-forwarding permit-pty permit-user-rc
6868 permit-X11-forwarding no-touch-required source-address=
69+ verify-required
6970
7071 lines= start-line= checkpoint= memory= start= generator=
7172
72- application challenge= device resident user
73- write-attestation-path
73+ application= challenge= device= no-touch-required resident
74+ user= write-attestation=
7475 ' -- " $cur " ) )
7576 [[ ${COMPREPLY-} == * [:= ] ]] && compopt -o nospace
7677 __ltrim_colon_completions " $cur "
@@ -80,10 +81,17 @@ _ssh_keygen()
8081 compopt -o filenames
8182 COMPREPLY=($( compgen -c -- " ${cur#* =} " ) )
8283 ;;
83- checkpoint=* | challenge=* )
84+ checkpoint=* | challenge=* | write-attestation= * )
8485 cur=${cur#* =}
8586 _filedir
8687 ;;
88+ application=* ([^:=]))
89+ COMPREPLY=($( compgen -W " ssh:" -- " ${cur#* =} " ) )
90+ compopt -o nospace
91+ ;;
92+ user=* )
93+ COMPREPLY=($( compgen -u -- " ${cur#* =} " ) )
94+ ;;
8795 esac
8896 fi
8997 return
Original file line number Diff line number Diff line change @@ -69,3 +69,19 @@ def test_O_force_command(self, completion):
6969 @pytest .mark .complete ("ssh-keygen -O unknown=" )
7070 def test_O_unknown (self , completion ):
7171 assert not completion
72+
73+ @pytest .mark .complete ("ssh-keygen -O application=" )
74+ def test_O_application (self , completion ):
75+ assert completion == "ssh:"
76+
77+ @pytest .mark .complete ("ssh-keygen -O application=s" )
78+ def test_O_application_s (self , completion ):
79+ assert completion == "sh:"
80+
81+ @pytest .mark .complete ("ssh-keygen -O application=ssh:" )
82+ def test_O_application_ssh_colon (self , completion ):
83+ assert not completion
84+
85+ @pytest .mark .complete ("ssh-keygen -O application=nonexistent" )
86+ def test_O_application_nonexistent (self , completion ):
87+ assert not completion
You can’t perform that action at this time.
0 commit comments