Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Rewrite of zsh-newuser-install
- X-seq: zsh-workers 48408
- From: gammafunction@xxxxxxxxxxx
- To: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- Cc: Marlon Richert <marlon.richert@xxxxxxxxx>, Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: Rewrite of zsh-newuser-install
- Date: Mon, 05 Apr 2021 21:31:00 +0000
- Archived-at: <https://zsh.org/workers/48408>
- Dkim-filter: OpenDKIM Filter v2.11.0 smtp.vivaldi.net 5E878BD01C
- Dkim-filter: OpenDKIM Filter v2.11.0 smtp.vivaldi.net 174A3BD00E
- In-reply-to: <20210405181637.GA22397@tarpaulin.shahaf.local2>
- List-id: <zsh-workers.zsh.org>
- References: <B865F477-D72B-426F-9691-268C2E65EC85@dana.is> <EAEB39F8-6DEF-4BC0-A7E4-A59B16DBDF2F@gmail.com> <D2248BF1-5045-4F68-89F0-F92C903EF73D@dana.is> <20210225080519.GA22300@tarpaulin.shahaf.local2> <CAHLkEDtR6LCZy_2Ks-KATn9T3xyMmNh=ifxiHF4+KhO5uT-Cxw@mail.gmail.com> <20210227132121.GA9308@tarpaulin.shahaf.local2> <CAHLkEDt+=qEL-jMqYxKBXBZuPEi_=dm-Ms-6oZY=b-RyjXJ2rw@mail.gmail.com> <20210405181637.GA22397@tarpaulin.shahaf.local2>
On Mon Apr 5, 2021 at 1:16 PM CDT, Daniel Shahaf wrote:
0. I recommend against reusing the name zsh-newuser-install for
a completely different thing. Names shouldn't be overloaded.
11. «print '\n'» prints _two_ newlines. That's too obscure for
educational code.
zsh-newusers-install is replacing the old zsh-newusers-install.
This isn't educational code like the rest of the files in the
repo are.
{1..4} {6..9}
+1 on all these.
5. what happens if the exec on the last line fails?
10. Should zrestart use «exec»?
(Addressed previously) zrestart doesn't use exec because it
could fail due to an error in the zshrc that wasn't caught
by the zsh -n line before.
That said, the same should apply to the newusers function.
12. Some settings seems like they could break the principle of least
surprise: e.g., FLOW_CONTROL, NUMERIC_GLOB_SORT, matcher 'b:-=+',
check-for-changes (as opposed to check-for-staged-changes).
- FLOW_CONTROL is unset by default, the line can be removed
- Not sure about NUMERIC_GLOB_SORT, do you have a surprising example?
- The 'b:-=+' is only prefixes, and only for the options tag. I would
actually almost prefer 'b:-=[^[:alnum:]]' to catch all kinds of
obscure
option styles programs use, make them discoverable from just typing
'-'.
- (No comment on check-for-changes)
13. Recommend not to hide symbols from grep, as i
up-line-or-{search,history}
I agree, brace expansions make it hard to search.
14. Use of «bindkey -s … '^Q…'» seems questionable. As a way to inject
commands, it prints them to the tty and adds them to the history; that
doesn't seem elegant enough for example code that all new users would
be
pointed to.
(Personally) I would rather directory changes being added to history.
It's also brittle in that it depends on ^Q not being
re-bindkey'd to anything else.
I can write a proper widget.
15. hjkl bindings for menu selection:
I type during menu selection, and users will be able to as well.
I think being able to type normally, except for a select few letters
would be confusing.
18. Show how to use terminal colours/attributes other than the basic
ones. E.g., I use ${terminfo[dim]} in some places.
We already 'autoload -Uz colors; colors', so $colors[faint] may be
preferred. Although it doesn't have \e[ like $terminfo[dim] does.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author