Skip to content

Commit f8757d1

Browse files
authored
Fix scp completion for WSL (with ssh.exe) (fish-shell#10290)
* Fix scp completion for WSL (with ssh.exe) * Be more explicit
1 parent 6d30363 commit f8757d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

share/completions/scp.fish

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ complete -c scp -d "Local Path" -n "not string match @ -- (commandline -ct)"
4444

4545
# Remote path
4646
# Get the list of remote files from the scp target.
47-
string match -rq 'OpenSSH_(?<major>\d+)\.*' -- (ssh -V 2>&1)
47+
string match -rq 'OpenSSH(_for_Windows)?_(?<major>\d+)\.*' -- (ssh -V 2>&1)
4848
if test "$major" -ge 9
4949
complete -c scp -d "Remote Path" -f -n "commandline -ct | string match -e ':'" -a "
5050
(__scp_remote_target):( \

0 commit comments

Comments
 (0)