mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-24 17:00:32 +02:00
18607: correctly handle quoting for remote files for rcp completion
This commit is contained in:
parent
a87ce0fb25
commit
b3ccc068a4
2 changed files with 8 additions and 3 deletions
|
|
@ -1,3 +1,8 @@
|
||||||
|
2003-06-05 Oliver Kiddle <opk@zsh.org>
|
||||||
|
|
||||||
|
* 18607: Completion/Unix/Command/_rlogin: correctly handle
|
||||||
|
quoting for remote files for rcp completion
|
||||||
|
|
||||||
2003-06-05 Peter Stephenson <pws@csr.com>
|
2003-06-05 Peter Stephenson <pws@csr.com>
|
||||||
|
|
||||||
* users/6154: Src/subst.c: anchors didn't work with //
|
* users/6154: Src/subst.c: anchors didn't work with //
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ _rcp_remote_files () {
|
||||||
local expl remfiles remdispf remdispd suf ret=1
|
local expl remfiles remdispf remdispd suf ret=1
|
||||||
|
|
||||||
if zstyle -T ":completion:${curcontext}:" remote-access; then
|
if zstyle -T ":completion:${curcontext}:" remote-access; then
|
||||||
remfiles=(${(M)${(f)"$(rsh ${IPREFIX%:} ls -d1F ${PREFIX%%[^./][^/]#}\* 2>/dev/null)"}%%[^/]#(|/)})
|
remfiles=(${(M)${(f)"$(rsh ${IPREFIX%:} ls -d1F ${(Q)PREFIX%%[^./][^/]#}\* 2>/dev/null)"}%%[^/]#(|/)})
|
||||||
compset -P '*/'
|
compset -P '*/'
|
||||||
compset -S '/*' || suf='remote file'
|
compset -S '/*' || suf='remote file'
|
||||||
|
|
||||||
|
|
@ -16,9 +16,9 @@ _rcp_remote_files () {
|
||||||
while _tags; do
|
while _tags; do
|
||||||
while _next_label files expl ${suf:-remote directory}; do
|
while _next_label files expl ${suf:-remote directory}; do
|
||||||
[[ -n $suf ]] && compadd "$@" "$expl[@]" -d remdispf \
|
[[ -n $suf ]] && compadd "$@" "$expl[@]" -d remdispf \
|
||||||
${remdispf%[*=@|]} && ret=0
|
${(q)remdispf%[*=@|]} && ret=0
|
||||||
compadd ${suf:+-S/} "$@" "$expl[@]" -d remdispd \
|
compadd ${suf:+-S/} "$@" "$expl[@]" -d remdispd \
|
||||||
${remdispd%/} && ret=0
|
${(q)remdispd%/} && ret=0
|
||||||
done
|
done
|
||||||
(( ret )) || return 0
|
(( ret )) || return 0
|
||||||
done
|
done
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue