summaryrefslogtreecommitdiff
path: root/Completion/Unix/Command
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2002-02-04 18:44:14 +0000
committerClint Adams <clint@users.sourceforge.net>2002-02-04 18:44:14 +0000
commit8db461b8e464c6abdee36a71a26d0af97bb4ef59 (patch)
treef8be111c1d89d11fa533e66bb6773d17405ae8d3 /Completion/Unix/Command
parent190aef0e25ecb56bde977dfe75fdc84b4a12c7d4 (diff)
downloadzsh-8db461b8e464c6abdee36a71a26d0af97bb4ef59.tar.gz
zsh-8db461b8e464c6abdee36a71a26d0af97bb4ef59.zip
16555: add | to bracket expression, 2>/dev/null
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r--Completion/Unix/Command/_ssh8
1 files changed, 4 insertions, 4 deletions
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)/}