From 4a4fa1af68df33d7b6841b93e44d5a71304dd839 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Wed, 11 Jun 2003 08:35:46 +0000 Subject: merge changes from 4.1 --- ChangeLog | 14 ++++++++++++++ Completion/Unix/Command/_rlogin | 6 +++--- Completion/Unix/Command/_ssh | 2 +- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 043295319..db5173d78 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-06-05 Oliver Kiddle + + * 18607: Completion/Unix/Command/_rlogin: correctly handle + quoting for remote files for rcp completion + 2003-06-05 Peter Stephenson * users/6154: Src/subst.c: anchors didn't work with // @@ -32,6 +37,15 @@ mention the inconsistency in README and alter the completion system to hide the `/' a parameter so that it doesn't care. +2003-05-07 Oliver Kiddle + + * users/6083: Completion/Unix/Command/_rlogin, + Completion/Unix/Command/_ssh: get hostname from IPREFIX instead + of words[CURRENT] to avoid quote characters + + * MichaƂ Politowski: users/6080: Completion/Unix/Command/_ssh: + remove one level of quoting on files before using with remote ls + 2003-05-07 Peter Stephenson * 18508: Src/subst.c, Test/D04parameter.ztst: quoting of the `/' diff --git a/Completion/Unix/Command/_rlogin b/Completion/Unix/Command/_rlogin index 522af7f4c..8cd5429be 100644 --- a/Completion/Unix/Command/_rlogin +++ b/Completion/Unix/Command/_rlogin @@ -5,7 +5,7 @@ _rcp_remote_files () { local expl remfiles remdispf remdispd suf ret=1 if zstyle -T ":completion:${curcontext}:" remote-access; then - remfiles=(${(M)${(f)"$(rsh ${words[CURRENT]%%:*} ls -d1F ${PREFIX%%[^./][^/]#}\* 2>/dev/null)"}%%[^/]#(|/)}) + remfiles=(${(M)${(f)"$(rsh ${IPREFIX%:} ls -d1F ${(Q)PREFIX%%[^./][^/]#}\* 2>/dev/null)"}%%[^/]#(|/)}) compset -P '*/' compset -S '/*' || suf='remote file' @@ -16,9 +16,9 @@ _rcp_remote_files () { while _tags; do while _next_label files expl ${suf:-remote directory}; do [[ -n $suf ]] && compadd "$@" "$expl[@]" -d remdispf \ - ${remdispf%[*=@|]} && ret=0 + ${(q)remdispf%[*=@|]} && ret=0 compadd ${suf:+-S/} "$@" "$expl[@]" -d remdispd \ - ${remdispd%/} && ret=0 + ${(q)remdispd%/} && ret=0 done (( ret )) || return 0 done diff --git a/Completion/Unix/Command/_ssh b/Completion/Unix/Command/_ssh index 40f495ea9..8494e823a 100644 --- a/Completion/Unix/Command/_ssh +++ b/Completion/Unix/Command/_ssh @@ -6,7 +6,7 @@ _remote_files () { if zstyle -T ":completion:${curcontext}:" remote-access; then zparseopts -D -E -a args p: 1 2 4 6 F: - remfiles=(${(M)${(f)"$(ssh $args -a -x ${words[CURRENT]%%:*} ls -d1F ${PREFIX%%[^./][^/]#}\* 2>/dev/null)"}%%[^/]#(|/)}) + remfiles=(${(M)${(f)"$(ssh $args -a -x ${IPREFIX%:} ls -d1F ${(Q)PREFIX%%[^./][^/]#}\* 2>/dev/null)"}%%[^/]#(|/)}) compset -P '*/' compset -S '/*' || suf='remote file' -- cgit 1.4.1