Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Unexpected behavior for completion funcion _remote_files()
- X-seq: zsh-workers 39821
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Unexpected behavior for completion funcion _remote_files()
- Date: Thu, 3 Nov 2016 14:59:09 +0000
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=G3i0tUEeyrUu4XS m3BLNwwb6yEA=; b=Iv6/9Y+6mchWklH95C1xHRKzs9luR3vlHSdgFdmaTZMKZ/X 96z7VZ5GZz2jvkVfIyIKgibzIql48y76enTChGAwSA2Rjw5GKEHOvPaZVpnqOhWe yzHXsVuVku6aslMk6D+3ow4qWfhWHx0wmMdCpwUZwYPRDKhEBi/ZQDsk7yGE=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=G3i0tUEeyrUu4X Sm3BLNwwb6yEA=; b=caFgzdT/Mzan9M46/3ULqsPFbG3Q1amnPW9C0Op0o1vSgT PapagxYCnagdsfa7Rq1NgOtmg71Jrl0J+3ZWaj+GJL03naXUATcXdR2KwMMpxgfs b/bu8DueY13RrbX6pm0EryQyDrFoKhUMX7B693vf87i2QBPBEXUZSt9PkyrNY=
- In-reply-to: <24775.1473694215@hydra.kiddle.eu>
- 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
- References: <CA+JhjB_Ry--Va9-Vz4z_6V7iEeEpJ2UbdAsFJFPe7vYcknB60A@mail.gmail.com> <95820.1473177359@hydra.kiddle.eu> <20160906221624.GA4800@fujitsu.shahaf.local2> <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
>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author