Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Unexpected behavior for completion funcion _remote_files()
- X-seq: zsh-workers 39192
- From: Yoshio Hanawa <y@xxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Unexpected behavior for completion funcion _remote_files()
- Date: Tue, 6 Sep 2016 23:34:47 +0900
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hnw-jp.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=E0Yensf64Owt0D4E4pSswe9jYtLoG6bjSoJxH9mkH+4=; b=JX0Tjke99pdjF+SWT8F6T6wBxq2KtKDNoIKd9NgdfVLysFHmCISZxpHHXlmWWa94sh SvPSuxRW6noQhm2Zq+mAuS0FO+11BcRDxOxhtdOOwmb3iw0jd8702agbuRSYa8spUf2j QVXVx40akdjg9kc1dgHkeBEjrfobWRg45dsZlAhWunj8xX3f/6k5MddSADgXqr4qnpk1 aI6VNJDNj0dcdJDkYD8AvSKW/eqryOvYn/CEIjhkyXrHs6QRzSvocqutnWdVCMa++qoq cYQCp2nB7CG4LbDr/IK6dXkGH1wU74vgOGxLPUrQNc6BeFNz0IUIsYIOwtK5QGina56r jJOA==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Hello all,
When I tried Zsh completion funcion _remote_files with 'docker exec ...', I
found the command line options for _remote_files (in this case, 'exec ...')
are passed directly to compadd. I think it's unexpected behavior.
--- Completion/Unix/Type/_remote_file:75-78
***
[[ -n $suf ]] &&
compadd "$@" "$expl[@]" -d remdispf ${(q)remdispf%[*=|]} && ret=0
compadd ${suf:+-S/} -r "/ \t\n\-" "$@" "$expl[@]" -d remdispd \
${(q)remdispd%/} && ret=0
***
"$@" in compadd arguments seems to be unnecessary, so should simply be
removed.
The following patch works fine on my environment.
*** zsh-5.2-orig/Completion/Unix/Type/_remote_files 2016-09-06
22:55:25.000000000 +0900
--- zsh-5.2/Completion/Unix/Type/_remote_files 2016-09-06
22:56:12.000000000 +0900
***************
*** 74,81 ****
while _tags; do
while _next_label files expl ${suf:-remote directory}; do
[[ -n $suf ]] &&
! compadd "$@" "$expl[@]" -d remdispf ${(q)remdispf%[*=|]} &&
ret=0
! compadd ${suf:+-S/} -r "/ \t\n\-" "$@" "$expl[@]" -d remdispd \
${(q)remdispd%/} && ret=0
done
(( ret )) || return 0
--- 74,81 ----
while _tags; do
while _next_label files expl ${suf:-remote directory}; do
[[ -n $suf ]] &&
! compadd "$expl[@]" -d remdispf ${(q)remdispf%[*=|]} && ret=0
! compadd ${suf:+-S/} -r "/ \t\n\-" "$expl[@]" -d remdispd \
${(q)remdispd%/} && ret=0
done
(( ret )) || return 0
Messages sorted by:
Reverse Date,
Date,
Thread,
Author