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()
55 local cur prev words cword comp_args
66 _comp_initialize -- " $@ " || return
77
8+ # Prefer `ssh` from same dir for resolving options, etc
9+ local pathcmd
10+ pathcmd=$( type -P " $1 " ) && local PATH=${pathcmd%/* } :$PATH
11+
812 _comp_xfunc ssh suboption_check && return
913
1014 case $prev in
Original file line number Diff line number Diff line change @@ -99,6 +99,9 @@ _comp_cmd_ssh_keygen()
9999 return
100100 ;;
101101 -* t)
102+ # Prefer `ssh` from same dir for resolving options, etc
103+ local pathcmd
104+ pathcmd=$( type -P " $1 " ) && local PATH=${pathcmd%/* } :$PATH
102105 local protocols=$( _comp_xfunc ssh query protocol-version)
103106 local types=' dsa ecdsa ecdsa-sk ed25519 ed25519-sk rsa'
104107 if [[ $protocols == * 1* ]]; then
You can’t perform that action at this time.
0 commit comments