From a02825fb1fc811ba806f4488983574016cbe175a Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Mon, 7 May 2018 22:25:17 -0700 Subject: [PATCH] Update skel to handle minimal environments. --- dotfiles/env | 46 ++++++++++++------- .../matir/functions/prompt_matir_setup | 4 +- 2 files changed, 33 insertions(+), 17 deletions(-) diff --git a/dotfiles/env b/dotfiles/env index bb443f1..f914dff 100755 --- a/dotfiles/env +++ b/dotfiles/env @@ -27,22 +27,36 @@ export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages' export GPG_ID=7FD58D9A196DCEEEAD671F94F4D7A7915DEA789B # Setup locale -for l in en_US.UTF-8 C ; do - if grep -q "${l}" /usr/share/i18n/SUPPORTED ; then - export LC_CTYPE=${l} - export LC_NUMERIC=${l} - export LC_TIME=${l} - export LC_MONETARY=${l} - export LC_MESSAGES=${l} - export LC_PAPER=${l} - export LC_NAME=${l} - export LC_ADDRESS=${l} - export LC_TELEPHONE=${l} - export LC_MEASUREMENT=${l} - export LC_IDENTIFICATION=${l} - break - fi -done +if test -f /usr/share/i18n/SUPPORTED ; then + for l in en_US.UTF-8 C ; do + if grep -q "${l}" /usr/share/i18n/SUPPORTED ; then + export LC_CTYPE=${l} + export LC_NUMERIC=${l} + export LC_TIME=${l} + export LC_MONETARY=${l} + export LC_MESSAGES=${l} + export LC_PAPER=${l} + export LC_NAME=${l} + export LC_ADDRESS=${l} + export LC_TELEPHONE=${l} + export LC_MEASUREMENT=${l} + export LC_IDENTIFICATION=${l} + break + fi + done +else + export LC_CTYPE=C + export LC_NUMERIC=C + export LC_TIME=C + export LC_MONETARY=C + export LC_MESSAGES=C + export LC_PAPER=C + export LC_NAME=C + export LC_ADDRESS=C + export LC_TELEPHONE=C + export LC_MEASUREMENT=C + export LC_IDENTIFICATION=C +fi export LC_COLLATE=C if [[ -e $HOME/.localenv ]] ; then source $HOME/.localenv ; fi diff --git a/dotfiles/zprezto_custom/matir/functions/prompt_matir_setup b/dotfiles/zprezto_custom/matir/functions/prompt_matir_setup index de89e78..4adec18 100644 --- a/dotfiles/zprezto_custom/matir/functions/prompt_matir_setup +++ b/dotfiles/zprezto_custom/matir/functions/prompt_matir_setup @@ -51,7 +51,9 @@ function prompt_matir_setup { function prompt_matir_precmd { vcs_info - python-info + if (( $+functions[python-info] )); then + python-info + fi } ### git: Show marker (*) if there are untracked files in repository