From 654cd21eda833272d580b9be681e25b563039412 Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Thu, 30 Nov 2017 09:50:10 +0000 Subject: [PATCH] Make zshenv logic more concise --- zshenv | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/zshenv b/zshenv index db8fab1..78cb2f7 100644 --- a/zshenv +++ b/zshenv @@ -18,23 +18,19 @@ LD_LIBRARY_PATH=$HOME/.local/lib:$LD_LIBRARY_PATH fpath+=$HOME/.local/share/zsh/site-functions # Add ccache to the PATH if present -if [ -f /usr/bin/ccache ]; then - PATH=/usr/lib/ccache:$PATH -fi +[ -f /usr/bin/ccache ] && PATH=/usr/lib/ccache:$PATH # Use ~/.local for pip installs on macOS -if [ "`uname`" = "Darwin" ]; then - export PYTHONUSERBASE=$HOME/.local -fi +[ "`uname`" = "Darwin" ] && export PYTHONUSERBASE=$HOME/.local # Change colors used by less and man -export LESS_TERMCAP_mb=$(printf "\e[0;31m") -export LESS_TERMCAP_md=$(printf "\e[0;36m") -export LESS_TERMCAP_me=$(printf "\e[0m") -export LESS_TERMCAP_so=$(printf "\e[1;40;32m") -export LESS_TERMCAP_se=$(printf "\e[0m") -export LESS_TERMCAP_us=$(printf "\e[0;34m") -export LESS_TERMCAP_ue=$(printf "\e[0m") +export LESS_TERMCAP_mb=`printf "\e[0;31m"` +export LESS_TERMCAP_md=`printf "\e[0;36m"` +export LESS_TERMCAP_me=`printf "\e[0m"` +export LESS_TERMCAP_so=`printf "\e[1;40;32m"` +export LESS_TERMCAP_se=`printf "\e[0m"` +export LESS_TERMCAP_us=`printf "\e[0;34m"` +export LESS_TERMCAP_ue=`printf "\e[0m"` # Disable virtualenv prompt VIRTUAL_ENV_DISABLE_PROMPT=1