Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: _ssh (scp)



> ls -a1F /dir (thereby getting all the dotfiles and potentially
> respecting the local setting of GLOB_DOTS)
> or
> ls -d1F /dir/* (thereby respecting the remote setting of GLOB_DOTS or
> equivalent)

I opted for the latter, but it doesn't quite work.

3.0.8% SLASH=/
3.0.8% print $SLASH
/
3.0.8% print $SLASH:h
/

4.0.4% SLASH=/
4.0.4% print $SLASH
/
4.0.4% print $SLASH:h
.

Was this change intentional?

Index: Completion/Unix/Command/_ssh
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_ssh,v
retrieving revision 1.8
diff -u -r1.8 _ssh
--- Completion/Unix/Command/_ssh	2002/02/05 18:03:26	1.8
+++ Completion/Unix/Command/_ssh	2002/02/05 18:05:04
@@ -5,13 +5,7 @@
   local expl remfiles remdispf remdispd
 
   if zstyle -T ":completion:${curcontext}:" remote-access; then
-    if [[ $options[globdots] == "on" ]] && [[ "$PREFIX" == */ || -z "$PREFIX" ]];
-    then
-      print ssh -a -x ${words[CURRENT]%:*} ls -a1F ${words[CURRENT]#*:}
-      remfiles=(${(f)"$(ssh -a -x ${words[CURRENT]%:*} ls -a1F ${words[CURRENT]#*:} 2>/dev/null)"})
-    else
-      remfiles=(${(f)"$(ssh -a -x ${words[CURRENT]%:*} ls -d1F ${words[CURRENT]#*:}\* 2>/dev/null)"})
-    fi
+    remfiles=(${(f)"$(ssh -a -x ${words[CURRENT]%:*} ls -d1F ${${${words[CURRENT]#*:}:h}/\\/(#e)/}/\* 2>/dev/null)"})
 
     remdispf=(${remfiles:#*/})
     remdispd=(${(M)remfiles:#*/})



Messages sorted by: Reverse Date, Date, Thread, Author