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

Re: Rewrite of zsh-newuser-install



On Fri, Feb 12, 2021 at 3:26 PM Oliver Kiddle <opk@xxxxxxx> wrote:
>
> > # Use `exec zsh` to apply changes after editing this file.
>
> Not sure I'd recommend that because if you mistype "zsh", your shell+terminal
> disappears. And if they've broken .zshrc, that can leave them unable to log
> back in.

zsh -l && exit

perhaps?  Also, check for minimal correctness with

zsh -nf .zshrc

> It can be quite helpful to leave PS2 empty and put <%^ in the [transient] right
> - allows for copy and paste without intervening prompts.

I believe I mentioned this also.  Actually, what I'd really like is a
variant of %_ that outputs N spaces for every level of complex command
depth; I'd use that in PS2 and %^ in transient RPS2, and presto you
get neatly indented code to copy-paste.

> > ZLE_REMOVE_SUFFIX_CHARS=$' \t\n;' # Characters that remove completion suffixes.
> > ZLE_SPACE_SUFFIX_CHARS=$'&|'      # Characters that instead replace them with a space.
>
> The first of these assignments is actually redundant because the latter takes
> precedence.

Is it really redundant?  Both settings will be applied, it's just that
SPACE_SUFFIX is tested first?

> > typeset -gU PATH path FPATH fpath CDPATH cdpath MANPATH manpath
>
> These are tied, no need to list both forms. The -g adds nothing either
> outside of a function.

The -U does nothing for the scalars, either.




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