aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/completions/scp.fish
diff options
context:
space:
mode:
authorGravatar James French <frenchie@frenchie.id.au>2013-05-21 12:45:54 +0800
committerGravatar David Adam (zanchey) <zanchey@ucc.gu.uwa.edu.au>2013-06-03 20:04:32 +0800
commitc177965da5d4fbf3aed0d3e4f227572394b8d1bf (patch)
tree7df9239bbe68c88f2259b6649bb8d90874097304 /share/completions/scp.fish
parent220e1e8fb5c4f88c8c97e5f07cb77d57d476be32 (diff)
Rsync Remote Path Completion
Relevant section lifted from scp.fish Silenced SSH output to squash banners and failed connections Erroneous 'and true' removed echo (commandline -ct) is exactly the same as commandline -ct
Diffstat (limited to 'share/completions/scp.fish')
-rw-r--r--share/completions/scp.fish8
1 files changed, 4 insertions, 4 deletions
diff --git a/share/completions/scp.fish b/share/completions/scp.fish
index 5e92ebf6..104cf521 100644
--- a/share/completions/scp.fish
+++ b/share/completions/scp.fish
@@ -17,7 +17,7 @@ complete -c scp -d Hostname -a "
(
#Prepend any username specified in the completion to the hostname
- echo (commandline -ct)|sed -ne 's/\(.*@\).*/\1/p'
+ commandline -ct |sed -ne 's/\(.*@\).*/\1/p'
)(
cat ~/.ssh/known_hosts{,2} ^/dev/null|cut -d ' ' -f 1| cut -d , -f 1
):
@@ -29,14 +29,14 @@ complete -c scp -d Hostname -a "
#
# Remote path
#
-complete -c scp -d "Remote Path" -n "echo (commandline -ct)|sgrep -o '.*:';and true" -a "
+complete -c scp -d "Remote Path" -n "commandline -ct|sgrep -o '.*:'" -a "
(
#Prepend any user@host information supplied before the remote completion
- echo (commandline -ct)|sgrep -o '.*:'
+ commandline -ct|sgrep -o '.*:'
)(
#Get the list of remote files from the specified ssh server
- ssh -o \"BatchMode yes\" (echo (commandline -ct)|sed -ne 's/\(.*\):.*/\1/p') ls\ -dp\ (echo (commandline -ct)|sed -ne 's/.*://p')\*
+ ssh -o \"BatchMode yes\" (commandline -ct|sed -ne 's/\(.*\):.*/\1/p') ls\ -dp\ (commandline -ct|sed -ne 's/.*://p')\* 2> /dev/null
)
"