From 8cf6d884eeefa0b28239772ecdc7c6e42cbf85a0 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Thu, 14 Jul 2011 22:44:49 -0400 Subject: [PATCH] Refactored environment. --- functions/environment.zsh | 29 +++++++++++++++++++++++++++++ functions/grep.zsh | 12 ------------ functions/mixed.zsh | 17 ----------------- 3 files changed, 29 insertions(+), 29 deletions(-) create mode 100644 functions/environment.zsh delete mode 100644 functions/grep.zsh delete mode 100644 functions/mixed.zsh diff --git a/functions/environment.zsh b/functions/environment.zsh new file mode 100644 index 00000000..bb4ff8a9 --- /dev/null +++ b/functions/environment.zsh @@ -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 + diff --git a/functions/grep.zsh b/functions/grep.zsh deleted file mode 100644 index 75cfc292..00000000 --- a/functions/grep.zsh +++ /dev/null @@ -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 - diff --git a/functions/mixed.zsh b/functions/mixed.zsh deleted file mode 100644 index efc38400..00000000 --- a/functions/mixed.zsh +++ /dev/null @@ -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 -