diff options
author | Clint Adams <clint@users.sourceforge.net> | 2008-03-01 01:03:18 +0000 |
---|---|---|
committer | Clint Adams <clint@users.sourceforge.net> | 2008-03-01 01:03:18 +0000 |
commit | 658deeb7e9df6a2093e8407c2bc02f44ffa3ef3e (patch) | |
tree | fce3f6f26904751b7f17cc9a16af59490537bace /Completion/Unix/Command/_rsync | |
parent | bc45a1b9942ff8d12e77fc038c265b8debc1ea77 (diff) | |
download | zsh-658deeb7e9df6a2093e8407c2bc02f44ffa3ef3e.tar.gz zsh-658deeb7e9df6a2093e8407c2bc02f44ffa3ef3e.tar.xz zsh-658deeb7e9df6a2093e8407c2bc02f44ffa3ef3e.zip |
24632: fix remote ssh filename quoting.
Diffstat (limited to 'Completion/Unix/Command/_rsync')
-rw-r--r-- | Completion/Unix/Command/_rsync | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Completion/Unix/Command/_rsync b/Completion/Unix/Command/_rsync index b5da516e3..0a86acb7d 100644 --- a/Completion/Unix/Command/_rsync +++ b/Completion/Unix/Command/_rsync @@ -58,7 +58,11 @@ elif compset -P 'rsync://'; then elif compset -P 1 '*:'; then if zstyle -T ":completion:${curcontext}:files" remote-access; then - remfiles=(${(M)${(f)"$(_call_program files ssh -a -x ${IPREFIX%:} ls -d1FL "${(Q)PREFIX%%[^./][^/]#}\*" 2>/dev/null)"}%%[^/]#(|/)}) + if [[ -z $QIPREFIX ]] + then rempat="${PREFIX%%[^./][^/]#}\*" + else rempat="${(q)PREFIX%%[^./][^/]#}\*" + fi + remfiles=(${(M)${(f)"$(_call_program files ssh -a -x ${IPREFIX%:} ls -d1FL "$rempat" 2>/dev/null)"}%%[^/]#(|/)}) compset -P '*/' compset -S '/*' || suf='remote file' |