Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
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
         :cc:content-type;
        bh=ydWjwLasgoGkdykjnFVQraaawCQ98fHhj5+4apAFfxE=;
        b=aSkpmh0GLBfFlJFHb4BARzVTy9EE8wP4w/R5IPCZ5PUiZsNMnednCEmAYTYFb3s8Rq
         uOtB98xVZ2xIPpBaUVJ70GxU70MxRP69yRiduMkob3n0QChBl1sCgVA1yj072GgOFdqV
         o3kRPypno6xz84lEMpOzfGsPm5g2J/Wa5YLpFdytnuu7jt5YCcyTaS6f0OrwF82w0vuR
         Vb7cWsDfKG7z15lJCuqFoBWsPsUW4VlPrm2aTEf7d3U6+Gzjilx+XxPEYmqve2UK23eM
         4BsNaUgWigVNZQv2wTR4UwK5B7ljrWK5C8q4t+6A8HOL78enupj//SEKC6L0IGlc1fK7
         xqOA==
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:cc:content-type;
        bh=ydWjwLasgoGkdykjnFVQraaawCQ98fHhj5+4apAFfxE=;
        b=Z7YH9vzf5s/qyu5QbedX8G77FOiych/YTKHlRlzm9ypErRRagIF+s2ichgprdtR4GH
         +qxb5wFbbB1KdTUYdFlgUaBwloea46O8gPM24tmhGssk0EpKGTVr1mhDC1XilpguVsHd
         AN6Bj4NNoxi5C7W7hGfEKJlG4I/uoozSDMV9vAqEKFGx9oG+j88HP5Kl0RD/ZN0yvekE
         57tmc7UHn3HETlTTuEzBt8LwgIBjcGos+8NgSj4Y/7od59cDl+OlHU34RrnI52KaeeRT
         2Y8ELEF0iLjB+AGThFZywEl1uUlk42DynykksblWALJOTLrkQ6kX4zBN0KZPn6b/Yn5i
         Iplg==
X-Gm-Message-State: ALoCoQkmqVZYHhiPfr7JBi5SFjGiMTIInWYq6MFvZnsqI7JGjfqG3kx5EcyB+qB5n57inra6ZW3LhsCMAPHP5nNjX7WmntAEUQ==
X-Received: by 10.112.198.102 with SMTP id jb6mr984094lbc.44.1452772781738;
 Thu, 14 Jan 2016 03:59:41 -0800 (PST)
MIME-Version: 1.0
In-Reply-To: <CAKc7PVBX_5KU2rtKUjh+70DoUcVBoVYsiPq4hyfvb5NuVmvQFQ@mail.gmail.com>
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>
 <160113204847.ZM14158@torch.brasslantern.com> <CAKc7PVByFUCv3hffWHk8DLhwatTqQbisjERi2Gw2BHNuJEsNGg@mail.gmail.com>
 <CAKc7PVBX_5KU2rtKUjh+70DoUcVBoVYsiPq4hyfvb5NuVmvQFQ@mail.gmail.com>
From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
Date: Thu, 14 Jan 2016 12:59:22 +0100
Message-ID: <CAKc7PVDn_NxFvRVBu=5RqyN_hecZ9cC06Axh=Kw24+re83KG5A@mail.gmail.com>
Subject: Re: _history-complete-older problems with $(
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Content-Type: text/plain; charset=UTF-8
X-Seq: zsh-workers 37623

The same actions but without menucomplete. I'm sorry for quite of a
flood, I understand that not all people read the list by threads,
sorry, I will group my thoughts next time.

https://asciinema.org/a/82i53qbirassjyhxpjbb9u55k

Best regards,
Sebastian Gniazdowski


On 14 January 2016 at 12:37, Sebastian Gniazdowski
<sgniazdowski@gmail.com> wrote:
> Better movie, I tried Tab multiple times with "ls" with no space after
> it. I test "ls" and "$(" with and without spaces after them.
>
> https://asciinema.org/a/bhslks3h04x328c72az3ugawz
>
> Best regards,
> Sebastian
>
> On 14 January 2016 at 12:30, Sebastian Gniazdowski
> <sgniazdowski@gmail.com> wrote:
>> On 14 January 2016 at 05:48, Bart Schaefer <schaefer@brasslantern.com> wrote:
>>> On Jan 13,  5:40pm, Sebastian Gniazdowski wrote:
>>> Ah.  Another wrinkle I overlooked.  You need to store the original
>>> values of $PREFIX and $SUFFIX somewhere, e.g.
>>>
>>>     local origPREFIX=$PREFIX origSUFFIX=$SUFFIX
>>>
>>> Then, after "compadd -O found" but before trimming PREFIX and SUFFIX
>>> off of $found, you need
>>>
>>>     PREFIX=${PREFIX#$origPREFIX}
>>>     SUFFIX=${SUFFIX%$origSUFFIX}
>>>
>>> This is because compadd will still try to replace the original word
>>> prefix ("wid") with whatever you pass to that second compadd, so if
>>> there was an original prefix/suffix you must NOT trim those off.  I
>>> didn't test my original version with anything other than an empty
>>> $PREFIX so didn't think of this.
>>>
>>> } The same problem is with "ls" about which I wrote to you earlier. So
>>> } it seems that the second compadd isn't fully working.
>>>
>>> When _history returns nonzero, your debugging line
>>>
>>>     echo >> /tmp/wfhistory
>>>
>>> is clobbering that with its own zero return, so completion stops even
>>> if no matches were found.  Move that last "echo" into the block that
>>> is after "always" (right before "unfunction compadd").
>>
>> Bart the menucomplete option has something to do with all those
>> things. I don't have the option set. When I set it it can be observed
>> how your code helps or harms $(<Tab> and ls<Tab>
>>
>> https://asciinema.org/a/1qyjrg38s411m8rbsvmtnfwgl
>>
>> Best regards,
>> Sebastian Gniazdowski

