summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--Completion/Unix/Command/_ssh8
2 files changed, 6 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 0a6a8cf23..5f05eb32e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,7 @@
2002-02-04 Clint Adams <clint@zsh.org>
- * 16553: Completion/Unix/Command/_ssh: differentiate between
- files and directories during remote scp completion.
+ * 16553, 16555: Completion/Unix/Command/_ssh: differentiate
+ between files and directories during remote scp completion.
2002-02-03 Felix Rosencrantz <f_rosencrantz@yahoo.com>
diff --git a/Completion/Unix/Command/_ssh b/Completion/Unix/Command/_ssh
index 8830db6ee..aa73da51b 100644
--- a/Completion/Unix/Command/_ssh
+++ b/Completion/Unix/Command/_ssh
@@ -1,15 +1,15 @@
#compdef ssh slogin=ssh scp ssh-add ssh-agent ssh-keygen
_remote_files () {
- # This is extremely simple-minded; could parse "ls -F" output to do
- # colorings and LIST_TYPES and so on, but I'm just not that ambitious.
+ # Rather than simple directory discrimination, there should be
+ # coloring based on all the different ls -F classifiers.
local expl remfiles
if zstyle -T ":completion:${curcontext}:" remote-access; then
- remfiles=(${(f)"$(ssh -a -x ${words[CURRENT]%:*} ls -d1F ${words[CURRENT]#*:}\*)"})
+ remfiles=(${(f)"$(ssh -a -x ${words[CURRENT]%:*} ls -d1F ${words[CURRENT]#*:}\* 2>/dev/null)"})
_wanted files expl 'remote files' \
- compadd ${${remfiles:#*/}/[*=@](#e)/}
+ compadd ${${remfiles:#*/}/[*=@|](#e)/}
_wanted dirs expl 'remote directories' \
compadd -S/ ${${(M)remfiles:#*/}/\\/(#e)/}