zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh workers <zsh-workers@zsh.org>
Subject: Re: reverse-menu-complete re-starting completion on 5.2?
Date: Wed, 9 Mar 2016 12:41:03 +0100	[thread overview]
Message-ID: <CAHYJk3R8TJLbSQYqAAJyvYjMZvgy2+W8qkGO9DLyEQmXOGppNQ@mail.gmail.com> (raw)
In-Reply-To: <CAHYJk3SbxtRxh6N0WtVfgSf0urCkYyqGG0foEHT72g93E-_hfQ@mail.gmail.com>

On Wed, Mar 9, 2016 at 12:12 PM, Mikael Magnusson <mikachu@gmail.com> wrote:
> On Mon, Mar 7, 2016 at 3:05 AM, Mikael Magnusson <mikachu@gmail.com> wrote:
>> On Sun, Mar 6, 2016 at 6:41 PM, Bart Schaefer <schaefer@brasslantern.com> wrote:
>>> Meant to respond to this a while ago ...
>>>
>>> On Feb 29,  1:45am, Oliver Kiddle wrote:
>>> }
>>> } Even before that commit I can reproduce a variant of the problem by
>>> } starting menu completion with reverse-menu-complete and then switching
>>> } to a forwards menu complete.
>>>
>>> Not surprising, really.
>>>
>>> } [...] I'm really not sure why we need to be so
>>> } strict about the completion widget matching the last completion widget.
>>>
>>> The only reason I can think of is in case menu completion is invoked from
>>> within a user-defined widget, or otherwise entered by a different widget
>>> than simple forward/reverse menu completion.  In that instance the user is
>>> presumably not continuing with the menu in progress but instead wants to
>>> start over.  I.e. similar to tests of $LASTWIDGET in Functions/Zle/*.
>>>
>>> } anyone foresee any problem with just relaxing the condition (see patch).
>>>
>>> Maybe we'd need another flag action for "zle -f" to continue/interrupt a
>>> menu in progress, but probably it will work as expected more often with
>>> the patch than without.  I suggest you push and we'll find out if a need
>>> for a flag arises.
>>
>> I can tell you I quite often complete a directory name using normal
>> completion, and then press ctrl-n to complete files inside by latest
>> modification date. If this continued cycling directories instead, it
>> would be quite inconvenient. But yeah, push and we'll see what happens
>> to that.
>
> Well, this use-case did indeed break with this commit.

While I'm sure everyone would be happy to reimplement this keybind
based on my vague description, here is the relevant setup:

zstyle ':completion:most-recent-file:*' match-original both
zstyle ':completion:most-recent-file:*' file-sort modification
zstyle ':completion:most-recent-file:*' file-patterns '*:all\ files'
zstyle ':completion:most-recent-file:*' hidden all
zstyle ':completion:most-recent-file:*' completer _files
zle -C most-recent-file menu-complete _generic

bindkey "^N"      most-recent-file

I would like ^N after TAB to start completion over (even if this was
originally a ^N completion), but TAB after ^N to continue the same
completion. This is how it worked before the commit. I'm fine with
replacing _generic with something else either custom in my rc or if we
distribute a new helper function.

-- 
Mikael Magnusson


  reply	other threads:[~2016-03-09 11:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20160226175937.GA22547@lorien.comfychair.org>
     [not found] ` <160226114511.ZM17604@torch.brasslantern.com>
2016-02-29  0:45   ` Oliver Kiddle
2016-03-06 17:41     ` Bart Schaefer
2016-03-07  2:05       ` Mikael Magnusson
2016-03-09 11:12         ` Mikael Magnusson
2016-03-09 11:41           ` Mikael Magnusson [this message]
2016-03-09 22:45             ` Bart Schaefer
2016-03-10  2:19               ` Mikael Magnusson

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=CAHYJk3R8TJLbSQYqAAJyvYjMZvgy2+W8qkGO9DLyEQmXOGppNQ@mail.gmail.com \
    --to=mikachu@gmail.com \
    --cc=schaefer@brasslantern.com \
    --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).