Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: _history-complete-older problems with $(
- X-seq: zsh-workers 37619
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: _history-complete-older problems with $(
- Date: Thu, 14 Jan 2016 11:14:35 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=TqXjh16I00StWyTGy7DdbjhXylpsqpEmvPqIXn6iMiM=; b=UlYG+69yhqBVPZG5f3atr473Z2jaBbHx5Bd0awDdeCCSXRNxGTYS0Msb3mfNhNC/sQ KmKA17EvmE3SJe8k8hrIK2P5U+W/jyOLG3Ck3n5DxzoHMre7nGyBKey6WE1bJLGN7CWy iwIZvQemrRmteaJpZjZEpEWWl98N6CRcnMgfVwEAhjutqrNbDAPI0BJiRLwxYnWM+VVX 5k0Y9edc72aHNeXadsJKJ+hNpf+DWi7CsGDoEXLvgMzb42C/6oqLNkjyby0IKU4d6hpC 3nRu/9EDPW24oD+8yZxeAgFVKOxfgR6TrvCJs81ybR1zpht28vxVd0S7XzpV8l6OYpjY ebrg==
- In-reply-to: <CAKc7PVAdLiKGvay412eLo=0jCpRB9PktAkAVj08sE=gjZ=4nQw@mail.gmail.com>
- 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: <CAKc7PVCnEX1rEhNqhtx7spyUVKCWukz4Tzkqr27-OV9+4hVciQ@mail.gmail.com> <CAKc7PVDVR=B8SWX+gSiNvtODWZ-25LtDz7jXVDH8BtrcxMnjXQ@mail.gmail.com> <160111161501.ZM5305@torch.brasslantern.com> <CAKc7PVBCEM=46YmgmhPR==Rq+pSfY+hgr8bcOMLV=zLFm6THBg@mail.gmail.com> <160112113928.ZM9065@torch.brasslantern.com> <20160113010147.GA4699@tarsus.local2> <160112180141.ZM9984@torch.brasslantern.com> <CAKc7PVBz1nNueRmEfyz3157kvJjEgHW3wmSXraKM+-9P-i5Atw@mail.gmail.com> <CAKc7PVAdLiKGvay412eLo=0jCpRB9PktAkAVj08sE=gjZ=4nQw@mail.gmail.com>
On 14 January 2016 at 10:52, Sebastian Gniazdowski
<sgniazdowski@xxxxxxxxx> wrote:
> PS. I used the "find LBUFFER myself" approach to handle following case
> better ("|" is cursor):
>
> % $(( 0 |+ 1 ))
>
> Doing ${(z)LBUFFER} and then (z) on right part of BUFFER would produce
> SUFFIX="+" instead of "+ 1 ))". If I find the word in ${(z)BUFFER}
That turned out to be not true, (z) isn't done on right part, instead
words[CURRENT] is utilized and chopped to obtain right part of shell
word.
local -a left=( "${(z)LBUFFER}" )
local right="${words[CURRENT]#${left[-1]}}"
So still clarifying things, maybe it's good idea to do (z) on right
part to obtain ${|a case behavior.
Best regards,
Sebastian Gniazdowski
Messages sorted by:
Reverse Date,
Date,
Thread,
Author