Zsh Mailing List Archive
Messages sorted by:
Re: Rewrite of zsh-newuser-install (Mikael's subthread)
- X-seq: zsh-workers 48418
- From: Marlon <marlon.richert@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Cc: Mikael Magnusson <mikachu@xxxxxxxxx>, Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: Rewrite of zsh-newuser-install (Mikael's subthread)
- Date: Wed, 7 Apr 2021 16:44:54 +0300
- Archived-at: <https://zsh.org/workers/48418>
- In-reply-to: <CAH+w=7buB+hUY6ufROgGTRc4SPzqjRuO6e4vq2gU4q_UzJHfirstname.lastname@example.org>
- List-id: <zsh-workers.zsh.org>
- References: <CAHYJk3Sh8ErYyObh=nURosOnj4+bsB1WsxhOi_-e=n_1fjAQ6Q@mail.gmail.com> <CAH+w=7buB+hUY6ufROgGTRc4SPzqjRuO6e4vq2gU4q_UzJHemail@example.com>
On 6. Apr 2021, at 0.44, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Mon, Apr 5, 2021 at 12:44 PM Mikael Magnusson <mikachu@xxxxxxxxx> 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
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
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. :)
"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."
Messages sorted by: