From 0e7790df8c77d8dc5ee0936ef4efa476ddbc6659 Mon Sep 17 00:00:00 2001 From: Shane Xu Date: Wed, 27 Nov 2013 23:39:52 +0800 Subject: [PATCH] add port information --- share/completions/scp.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/completions/scp.fish b/share/completions/scp.fish index f7e131f50..f791b8af5 100644 --- a/share/completions/scp.fish +++ b/share/completions/scp.fish @@ -31,7 +31,7 @@ complete -c scp -d "Remote Path" -n "commandline -ct|sgrep -o '.*:'" -a " commandline -ct|sgrep -o '.*:' )( #Get the list of remote files from the specified ssh server - ssh -o \"BatchMode yes\" (commandline -ct|sed -ne 's/\(.*\):.*/\1/p') ls\ -dp\ (commandline -ct|sed -ne 's/.*://p')\* 2> /dev/null + ssh (commandline -c|sgrep -o '\-P [0-9]*'|tr P p) -o \"BatchMode yes\" (commandline -ct|sed -ne 's/\(.*\):.*/\1/p') ls\ -dp\ (commandline -ct|sed -ne 's/.*://p')\* 2> /dev/null ) "