From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6049 invoked by alias); 14 Jan 2016 10:14:59 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 37619 Received: (qmail 5865 invoked from network); 14 Jan 2016 10:14:57 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 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== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=TqXjh16I00StWyTGy7DdbjhXylpsqpEmvPqIXn6iMiM=; b=C6RasGk9l5wxQauP8O8lCLk42XYKvj8SwHzTN2V51jNmUeZbrOpudpgm753SzDvrfd vnP/bHjGAAgmcQrc5+alSdCyWZBb1rO9MLJTYufr2UlwL6sMlh9be2BenpGgLgowDfl2 UxesRjC3Jj93ulKkDg0Ev5eVmArnCaOBTmsz0bmIV07eKeont7znrNc5RLbGdiGihUas L79erhvfZR4bezYLYyklMAJUb+skvg84og7jgeVWRh6SWNWYd59ZDCojlEsFUrVFUHHu wwBwU/e/uENVXWimnEwHKLW7WOP76zYeAu57KjKFwqJyc8EnsLUD0z9oMyHS5x0Yd6ht Kj8w== X-Gm-Message-State: ALoCoQmHMtIOU89XyN3Plf4Fa1pyYvwrhgnPRxdRldYa2+S1ARKxbjvJkSCWTKWQh49T8VmIz9zNk5eT35/Nz7cIoKA88QvgEg== X-Received: by 10.112.134.165 with SMTP id pl5mr905183lbb.126.1452766494957; Thu, 14 Jan 2016 02:14:54 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: <160111161501.ZM5305@torch.brasslantern.com> <160112113928.ZM9065@torch.brasslantern.com> <20160113010147.GA4699@tarsus.local2> <160112180141.ZM9984@torch.brasslantern.com> From: Sebastian Gniazdowski Date: Thu, 14 Jan 2016 11:14:35 +0100 Message-ID: Subject: Re: _history-complete-older problems with $( To: Zsh hackers list Content-Type: text/plain; charset=UTF-8 On 14 January 2016 at 10:52, Sebastian Gniazdowski 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