about summary refs log tree commit diff
path: root/Completion/Unix/Command/_ssh
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2002-09-26 11:52:26 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2002-09-26 11:52:26 +0000
commit105e3e78b60f9f3e9ca1b75e8620e8212c9f75eb (patch)
treeeb008193bba5c91a6b133d6eaec87a892a6f35b4 /Completion/Unix/Command/_ssh
parent3dec409d1e989ebce4e51f603a86a00e3b3df717 (diff)
downloadzsh-105e3e78b60f9f3e9ca1b75e8620e8212c9f75eb.tar.gz
zsh-105e3e78b60f9f3e9ca1b75e8620e8212c9f75eb.tar.xz
zsh-105e3e78b60f9f3e9ca1b75e8620e8212c9f75eb.zip
pass on options to ssh when getting remote files for scp completion
Diffstat (limited to 'Completion/Unix/Command/_ssh')
-rw-r--r--Completion/Unix/Command/_ssh7
1 files changed, 4 insertions, 3 deletions
diff --git a/Completion/Unix/Command/_ssh b/Completion/Unix/Command/_ssh
index c633244bc..9d56feae9 100644
--- a/Completion/Unix/Command/_ssh
+++ b/Completion/Unix/Command/_ssh
@@ -2,10 +2,11 @@
 
 _remote_files () {
   # There should be coloring based on all the different ls -F classifiers.
-  local expl remfiles remdispf remdispd suf ret=1
+  local expl remfiles remdispf remdispd args suf ret=1
 
   if zstyle -T ":completion:${curcontext}:" remote-access; then
-    remfiles=(${(M)${(f)"$(ssh -a -x ${words[CURRENT]%%:*} ls -d1F ${PREFIX%%[^./][^/]#}\* 2>/dev/null)"}%%[^/]#(|/)})
+    zparseopts -D -E -a args p: 1 2 4 6 F:
+    remfiles=(${(M)${(f)"$(ssh $args -a -x ${words[CURRENT]%%:*} ls -d1F ${PREFIX%%[^./][^/]#}\* 2>/dev/null)"}%%[^/]#(|/)})
     compset -P '*/'
     compset -S '/*' || suf='remote file'
 
@@ -262,7 +263,7 @@ _ssh () {
       ;;
     file)
       if compset -P '*:'; then
-        _remote_files && ret=0
+        _remote_files ${(kv)~opt_args[(I)-[FP1246]]/-P/-p} && ret=0
       elif compset -P '*@'; then
         _wanted hosts expl host _ssh_hosts -S: && ret=0
       else