Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Rewrite of zsh-newuser-install



Catching up on some stuff from the past couple of days ...

On Tue, Feb 9, 2021 at 12:18 AM Marlon Richert <marlon.richert@xxxxxxxxx> wrote:
>
> On Tue, Feb 9, 2021 at 3:42 AM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> > [...] application mode is exactly the opposite of how I want my shell
> > behaving, unless I'm misinterpreting your code.
>
> If we don't put the terminal into application mode, then we cannot use
> terminfo.

I'm surprised we haven't heard from Roman about this, given the
content of that reddit thread he linked back at the start of this.

> > Don't mess with Ctrl-U.
>
> Why not? Control-U does backward-kill-line everywhere, except in Zsh.

This is going to sound curmudgeonly (and it is), but the answer is
because the standard tty driver (stty) doesn't have
backward-kill-line.  ^U is "kill" not "kill to the left".

WORDCHARS='' bothers me for the same reason, I want ^W to do the same
thing whether I'm at the shell prompt or typing to a dumb stdin with
no built-in smart editor.

But, this is just my opinion, I have no pretense to veto power here.

> > I'm not sure I like your choices for Enter / Alt-Enter in menuselect,
> > because it seems to presume that the most common case is to do
> > menu-selection on the last word being entered for a command
>
> I didn't make any such assumption. I use menu selection quite at
> random; mostly when I cannot get what I want at the top of the list by
> typing. Can you please explain how you came to that conclusion and how
> my choice of menuselect bindings would impact your case?

OK, let me try to explain more fully.

My most common usage is when I am unable to remember all the
command-line options or subcommand phrases for commands such as "git".
Thus, when I enter menu selection, it's rarely the case that once I
have chosen something I want to immediately execute the command line;
the majority of those options or phrases need more words to follow.

For me, this is by far the most frequent situation.  I'd be typing
Alt-Enter (if that even works, on some keyboards it doesn't and I'd
have to type ESC followed by Enter) constantly.  It would make much
more sense to me for the single unmodified keystroke to exit the
selection but leave me at the command line, and the modified key to
mean that the command is complete and should be executed immediately.

The only time it would be obvious to me that I should instantly
execute the command after selecting from the menu is when the word
being selected is the only one remaining to form a complete command.
That's usually the last word on the line, hence my presumption about
the use case for which you made this choice of bindings.




Messages sorted by: Reverse Date, Date, Thread, Author