While debugging #30 I noticed that root's zsh leaks red foreground and doesn't understand comments:
Here the first 3 red lines is the command I've typed. export LESS=-r is the output of tail. Note that both of these are red. And then there is "bad pattern" error due to a comment in my command.
Also, my Home and End keys didn't work. I've fixed these issues and a few more that I noticed in the same file.
Don't leave red foreground on at the start of every command. This causes the command line to be red. It also randomly and inconsistently colors output of commands red.
Remove an unnecessary space from right prompt.
Use the newer syntax for colors: '%F{red}this is red%f'.
Show '%' instead of '#' in prompt if the user is not privileged. This matches bash prompt (although bash uses '$' instead of '%') and standard convention.
Correctly autoload functions even if KSH_AUTOLOAD is set.
Make Home and End keys work in all mainstream terminals.
Remove '/', '&', '.' and ';' from WORDCHARS as it seems to have been intended. Previously, only '/' and '&' were removed.
Enable INTERACTIVE_COMMENTS so that zsh doesn't barf when users copy-paste commands with comments in them.
Replace APPEND_HISTORY with INC_APPEND_HISTORY. The latter is significantly less likely to result in the loss of history and it matches the existing comment.
While debugging #30 I noticed that root's zsh leaks red foreground and doesn't understand comments:
Here the first 3 red lines is the command I've typed.
export LESS=-r
is the output oftail
. Note that both of these are red. And then there is "bad pattern" error due to a comment in my command.Also, my Home and End keys didn't work. I've fixed these issues and a few more that I noticed in the same file.
'%F{red}this is red%f'
.KSH_AUTOLOAD
is set.WORDCHARS
as it seems to have been intended. Previously, only '/' and '&' were removed.INTERACTIVE_COMMENTS
so that zsh doesn't barf when users copy-paste commands with comments in them.APPEND_HISTORY
withINC_APPEND_HISTORY
. The latter is significantly less likely to result in the loss of history and it matches the existing comment.