zsh-workers
 help / color / mirror / code / Atom feed
From: Marlon <marlon.richert@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Mikael Magnusson <mikachu@gmail.com>,
	Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: Rewrite of zsh-newuser-install (Mikael's subthread)
Date: Wed, 7 Apr 2021 16:44:54 +0300	[thread overview]
Message-ID: <FF8C7887-BA44-4317-AA7C-CB2F7296F078@gmail.com> (raw)
In-Reply-To: <CAH+w=7buB+hUY6ufROgGTRc4SPzqjRuO6e4vq2gU4q_UzJH=eg@mail.gmail.com>

On 6. Apr 2021, at 0.44, Bart Schaefer <schaefer@brasslantern.com> wrote:
> 
> On Mon, Apr 5, 2021 at 12:44 PM Mikael Magnusson <mikachu@gmail.com> wrote:
>> 
>>> # Prompt settings
>> 
>> This is 70 lines that should be a prompt theme, not pasted verbatim in .zshrc.
> 
> There was some side discussion about prompt themes being unmaintained
> and therefore unsuitable for this.  My take is that we should find a
> way to put some effort into maintaining it.  We did just have a few
> patches for it, so I personally would be fine with this going into a
> theme.

Sure, I can make a theme out of it. I think it’s important, though, to then make said theme sufficiently easy for the end user to customize. As Roman pointed out way in the beginning of the thread, one of the top things that user want to customize in their shell is their prompt. I will try to make it as easy possible for them.


> 
>>> typeset -A key  # Declare `$key` table, without overriding any existing values.
>> 
>> How could $key possibly already exist as an associative array at this
>> point?

It is created in /etc/zshrc on both macOS and Debian.

> Also, won't this by default print everything that's already in $key if
> by some magic (/etc/zsh* or ~/.zshenv ?) it does already exist?

I tested it and it doesn’t.


>>> bindkey -M menuselect "$key[PageUp]"   backward-word          # Page Up
>>> bindkey -M menuselect "$key[PageDown]" forward-word           # Page Down
>> 
>> I think most people expect these keys to scroll history backward/forwards.
> 
> I don't recall what difference being in the menuselect keymap makes here.

These apply to complist's menu selection only. Being able to page up/down in long completion menus is very handy.


>>> bindkey -s '^[-' "^Qpushd -1$key[Return]"   # Alt-Minus:  Back to previous dir stack entry.
>>> bindkey -s '^[=' "^Qpushd +0$key[Return]"   # Alt-Equals: Forward to next dir stack entry.
>> 
>> Might go as far as say NAK on these bindkey -s abominations.
> 
> Yeurgh.  Agree, avoid bindkey -s.

Sure, I could make these into autoloadable functions instead.


>> Overall I think there's a bit too much stuff in here. It's longer than
>> some (many) actual personal .zshrc files I've seen.
> 
> I tend to agree.

The feedback I’ve gotten, however, from the Zsh packagers for ALT Linux, Adélie Linux, openSuse and Fedora is that it’s good stuff. :)

Some quotes:

"this zshrc offers a lot of tricks I personally wanted to use but didn't know they were already implemented; thanks a lot for shining a light on them!”

"I gave it a spin and it looks very nice, much less scary than the default one. I've checked the default .zshrc and it looks fine to me."



  reply	other threads:[~2021-04-07 13:45 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-05 19:44 Mikael Magnusson
2021-04-05 21:01 ` Mikael Magnusson
2021-04-05 21:44 ` Bart Schaefer
2021-04-07 13:44   ` Marlon [this message]
2021-04-07 16:24     ` Daniel Shahaf
2021-04-10 11:23       ` Marlon
2021-04-10 20:46         ` dana
2021-04-10 21:41           ` Bart Schaefer
2021-04-10 22:03             ` Roman Perepelitsa
2021-04-11 11:38               ` Marlon Richert
2021-04-13 14:49               ` Daniel Shahaf
2021-04-13 14:55           ` Daniel Shahaf
2021-04-07 14:28 ` Marlon
2021-04-07 15:14   ` Daniel Shahaf
2021-04-07 16:36   ` Bart Schaefer
2021-04-07 18:15   ` Mikael Magnusson
2021-04-07 18:50     ` Daniel Shahaf
2021-04-07 20:08     ` Arseny Maslennikov
2021-04-09 20:07     ` Marlon
2021-04-09 22:04       ` Oliver Kiddle
2021-04-09 23:04         ` Daniel Shahaf
2021-04-09 23:55           ` Bart Schaefer
2021-04-13 15:00             ` Daniel Shahaf
2021-04-09 23:08         ` Bart Schaefer
2021-04-10  7:44           ` Roman Perepelitsa
2021-04-09 23:23       ` Mikael Magnusson
2021-04-10  7:45         ` Marlon Richert
2021-04-09 15:29   ` Marlon

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=FF8C7887-BA44-4317-AA7C-CB2F7296F078@gmail.com \
    --to=marlon.richert@gmail.com \
    --cc=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).