From 8db461b8e464c6abdee36a71a26d0af97bb4ef59 Mon Sep 17 00:00:00 2001 From: Clint Adams Date: Mon, 4 Feb 2002 18:44:14 +0000 Subject: 16555: add | to bracket expression, 2>/dev/null --- Completion/Unix/Command/_ssh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Completion/Unix/Command/_ssh') 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)/} -- cgit v1.2.3