From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: zsh-workers@zsh.org
Subject: Re: Unexpected behavior for completion funcion _remote_files()
Date: Thu, 3 Nov 2016 14:59:09 +0000 [thread overview]
Message-ID: <20161103145909.GA13594@fujitsu.shahaf.local2> (raw)
In-Reply-To: <24775.1473694215@hydra.kiddle.eu>
Oliver Kiddle wrote on Mon, Sep 12, 2016 at 17:30:15 +0200:
> On 6 Sep, Daniel Shahaf wrote:
> > > + args=( ${argv[1,(I)--]} )
> >
> > Should be (i), not (I), in case the [<cmd options>] themselves contain
> > a '--' word.
>
> I had intentionally used (I) to cope with the case where there is no
> '--' on the line at all.
>
> This should handle either case.
>
> Oliver
>
> diff --git a/Completion/Unix/Type/_remote_files b/Completion/Unix/Type/_remote_files
> index 54bd438..dbfb561 100644
> --- a/Completion/Unix/Type/_remote_files
> +++ b/Completion/Unix/Type/_remote_files
> @@ -38,9 +38,9 @@ if zstyle -T ":completion:${curcontext}:files" remote-access; then
> zparseopts -D -E -a args / g:=glob h:=host
> (( $#host)) && shift host || host="${IPREFIX%:}"
>
> - args=( ${argv[1,(I)--]} )
> + args=( ${argv[1,(i)--]} )
> shift ${#args}
> - args[-1]=()
> + [[ args[-1] = -- ]] && args[-1]=()
In latest master, scp behaves as follows:
% scp foo:<TAB>
-J -d -default- remdispd remdispf
It bisects to the patch I'm replying to (98581594b50d == 39295).
This is the behaviour regardless of whether 'foo' is a valid hostname or
not.
Cheers,
Daniel
> # Command to run on the remote system.
> cmd="$1"
> shift
>
next prev parent reply other threads:[~2016-11-03 14:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-06 14:34 Yoshio Hanawa
2016-09-06 15:55 ` Oliver Kiddle
2016-09-06 17:26 ` Yoshio Hanawa
2016-09-06 22:16 ` Daniel Shahaf
2016-09-12 15:30 ` Oliver Kiddle
2016-11-03 14:59 ` Daniel Shahaf [this message]
2016-11-03 15:37 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161103145909.GA13594@fujitsu.shahaf.local2 \
--to=d.s@daniel.shahaf.name \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).