File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,10 @@ _comp_cmd_ssh_copy_id()
5
5
local cur prev words cword comp_args
6
6
_comp_initialize -- " $@ " || return
7
7
8
+ # Prefer `ssh` from same dir for resolving options, etc
9
+ local pathcmd
10
+ pathcmd=$( type -P " $1 " ) && local PATH=${pathcmd%/* } :$PATH
11
+
8
12
_comp_xfunc ssh suboption_check && return
9
13
10
14
case $prev in
Original file line number Diff line number Diff line change @@ -99,6 +99,9 @@ _comp_cmd_ssh_keygen()
99
99
return
100
100
;;
101
101
-* t)
102
+ # Prefer `ssh` from same dir for resolving options, etc
103
+ local pathcmd
104
+ pathcmd=$( type -P " $1 " ) && local PATH=${pathcmd%/* } :$PATH
102
105
local protocols=$( _comp_xfunc ssh query protocol-version)
103
106
local types=' dsa ecdsa ecdsa-sk ed25519 ed25519-sk rsa'
104
107
if [[ $protocols == * 1* ]]; then
You can’t perform that action at this time.
0 commit comments