-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it worth adding Directory and Environment plugins? #10
Comments
They weren't purposefully excluded, I just ended up porting the minimal amount of stuff I needed. There's not a lot in either of those plugins, but they do seem useful. I'm more a fan of the settings in |
LOL, guess I'm opposite since I noticed this because of the missing csh-style directory stack settings - CDABLE_VARS also lets you do things like
Awesome! A new combined |
^ PR above. What I didn't do yet was include manpage colorizing: if zstyle -t ':prezto:environment:termcap' color; then
export LESS_TERMCAP_mb=$'\E[01;31m' # Begins blinking.
export LESS_TERMCAP_md=$'\E[01;31m' # Begins bold.
export LESS_TERMCAP_me=$'\E[0m' # Ends mode.
export LESS_TERMCAP_se=$'\E[0m' # Ends standout-mode.
export LESS_TERMCAP_so=$'\E[00;47;30m' # Begins standout-mode.
export LESS_TERMCAP_ue=$'\E[0m' # Ends underline.
export LESS_TERMCAP_us=$'\E[01;32m' # Begins underline.
fi The reason being that there are alternate (arguably better) ways to do this. The first is setting these variables in the new environment plugin, same as above. That makes them easily overridable by a user if they don't want them, and matches what Prezto did. But, an alternative would be a simple function man {
# start/end - md/me:bold; us/ue:underline; so/se:standout;
# colors - 0:black; 1:red; 2:green; 3:yellow; 4:blue; 5:magenta; 6:cyan; 7:white;
# tput cmds - setaf:fgcolor; smul:underline; smso:standout; sgr0:clear;
env \
LESS_TERMCAP_md=$(tput bold; tput setaf 4) \
LESS_TERMCAP_me=$(tput sgr0) \
LESS_TERMCAP_us=$(tput smul; tput setaf 5) \
LESS_TERMCAP_ue=$(tput sgr0) \
LESS_TERMCAP_so=$(tput smso) \
LESS_TERMCAP_se=$(tput rmso) \
PAGER="${commands[less]:-$PAGER}" \
command man -- "$@"
} If we went the first route, it probably goes in the new environment plugin. If we go with a |
There are a few default modules in Prezto that aren't included with zsh-utils (https://github.com/sorin-ionescu/prezto/blob/51c4ff6de4e2d1afd30e52ba19b21b1128fd1ed5/runcoms/zpreztorc#L33-L42):
Of course the goal isn't to just be a Prezto knockoff, and most of these are better off as separate plugins (terminal, spectrum, and hist-sub-search). But, the environment and directory plugins seem like they have some value. They are simple enough in functionally that they don't merit their own plugin, and their purpose is closely related to setting/configuring Zsh's behavior.
My question is - is it worth adding variations of these to zsh-utils? Were they purposely excluded?
The text was updated successfully, but these errors were encountered: