Refactored environment.
This commit is contained in:
parent
37dbcf7a20
commit
3d465712bc
3 changed files with 29 additions and 29 deletions
29
functions/environment.zsh
Normal file
29
functions/environment.zsh
Normal file
|
@ -0,0 +1,29 @@
|
|||
# Smart URLs
|
||||
autoload -Uz url-quote-magic
|
||||
zle -N self-insert url-quote-magic
|
||||
|
||||
# Jobs
|
||||
setopt long_list_jobs
|
||||
|
||||
# Locale
|
||||
[[ -z "$LANG" ]] && export LANG="en_US.UTF-8"
|
||||
[[ -z "$LC_ALL" ]] && export LC_ALL="en_US.UTF_8"
|
||||
[[ -z "$LC_COLLATE" ]] && export LC_COLLATE="en_US.UTF-8"
|
||||
[[ -z "$LC_CTYPE" ]] && export LC_CTYPE="en_US.UTF-8"
|
||||
[[ -z "$LC_MESSAGES" ]] && export LC_MESSAGES="en_US.UTF-8"
|
||||
[[ -z "$LC_MONETARY" ]] && export LC_MONETARY="en_US.UTF-8"
|
||||
[[ -z "$LC_NUMERIC" ]] && export LC_NUMERIC="en_US.UTF-8"
|
||||
[[ -z "$LC_TIME" ]] && export LC_TIME="en_US.UTF-8"
|
||||
|
||||
# Pager
|
||||
[[ -z "$PAGER" ]] && export PAGER=less
|
||||
|
||||
# Grep
|
||||
if [[ "$DISABLE_COLOR" != 'true' ]]; then
|
||||
[[ -z "$GREP_OPTIONS" ]] && export GREP_OPTIONS='--color=auto'
|
||||
[[ -z "$GREP_COLOR" ]] && export GREP_COLOR='37;45'
|
||||
else
|
||||
export GREP_OPTIONS='--color=none'
|
||||
export GREP_COLOR=''
|
||||
fi
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
if [[ "$DISABLE_COLOR" != 'true' ]]; then
|
||||
if [[ -z "$GREP_OPTIONS" ]]; then
|
||||
export GREP_OPTIONS='--color=auto'
|
||||
fi
|
||||
if [[ -z "$GREP_COLOR" ]]; then
|
||||
export GREP_COLOR='37;45'
|
||||
fi
|
||||
else
|
||||
export GREP_OPTIONS='--color=none'
|
||||
export GREP_COLOR=''
|
||||
fi
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
# Smart URLs
|
||||
autoload -U url-quote-magic
|
||||
zle -N self-insert url-quote-magic
|
||||
|
||||
# Jobs
|
||||
setopt long_list_jobs
|
||||
|
||||
# Pager
|
||||
if [[ -z "$PAGER" ]]; then
|
||||
export PAGER=less
|
||||
fi
|
||||
|
||||
# Localization
|
||||
if [[ -z "$LC_CTYPE" ]]; then
|
||||
export LC_CTYPE=en_US.UTF-8
|
||||
fi
|
||||
|
Loading…
Reference in a new issue