1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2025-06-14 20:41:44 +00:00

Use zstyle instead of variables for configuration.

This commit is contained in:
Sorin Ionescu
2011-12-26 13:37:53 -05:00
parent 60f39d8d91
commit f0499b76c3
13 changed files with 156 additions and 103 deletions

View File

@ -2,11 +2,11 @@
# FILE: gnu-utils.plugin.zsh
# DESCRIPTION: oh-my-zsh plugin file.
# AUTHOR: Sorin Ionescu <sorin.ionescu@gmail.com>
# VERSION: 1.0.1
# VERSION: 1.0.2
# ------------------------------------------------------------------------------
if (( $+commands[gwhoami] )); then
if (( $+commands[gdircolors] )); then
function __gnu_utils() {
emulate -L zsh
local gcmds
@ -59,5 +59,13 @@ if (( $+commands[gwhoami] )); then
function rehash() {
hash -r "$@"
}
# A sensible default for ls.
if zstyle -t ':omz:alias:ls' color && [[ -f "$HOME/.dir_colors" ]]; then
eval $(gdircolors "$HOME/.dir_colors")
alias ls='ls -hF --group-directories-first --color=auto'
else
alias ls='ls -hF --group-directories-first'
fi
fi