Hi, When logging into a porterbox, it would be quite useful to have a theme that reads /etc/debian_chroot and puts it somewhere on the prompt. The default debian bash prompt does that. The default zsh config (as done when pressing 2 on initial zsh run) loads the promptinit extension and enables a theme by default. However, none of the themes reads out /etc/debian_chroot. I understand one could provide this configuration by hand. However, since porterboxes are things one uses relatively sparingly, a good-enough prompt by default (or easily achievable) would be better than fetching configuration from elsewhere, and then reloading zsh.
A new prompt_debian_setup that no longer tries to mimic adam1 is attached. I think "#setopt no_beep" and "#stty -ixon" should also be added to newuser.zshrc.recommended, but maybe we should concentrate on the prompt for now.
Hi Carsten, I looked through the suggestions from your last mail; comments inline. Carsten Hey wrote: [...] The latter might better be replaced by zsh's "no_flow_control" option. [...] You could also check something like a "blacklist" style, that could be a list of term names (or better yet, patterns). That way you could blacklist $TERMs like "emacs" for colours as well. Good! I like it when people refrain from polluting the global parameter name space just for prompt colours. This is good. :-) [...] Makes sense. [...] Maybe make these configurable via styles? I think that looks reasonable. To set defaults you can do: zstyle -s "$zstyle_pattern" dircolor dircolor || dircolor=4 And again, maybe rather use names instead of numbers: zstyle -s "$zstyle_pattern" dircolor dircolor || dircolor=blue You also don't need to initialise to the empty string in the "local" above. Assembling a non-trivial prompt like always looks unreadable. I've seen worse than this. I don't understand this. "transientrprompt" can — and IMO should be — set outside a prompt setup. I'd do this in an "if ...; then...; fi" to improve readability. [...] Again, you can use the colour names instead of the numbers instead. [...] The contents of the ".thisfiledoesnotexist" file seems very similar to the one of the "prompt_debian_setup" file. Attached by mistake? Regards, Frank