From 3a66be5bb618aa102921dae3d76948f4f90c9b4c Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sun, 6 Nov 2022 23:59:18 +0000 Subject: [PATCH] Move ZSH app imports to .zshrc, not .zshenv --- config/zsh/.zshenv | 14 -------------- config/zsh/.zshrc | 18 +++++++++++++++--- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/config/zsh/.zshenv b/config/zsh/.zshenv index 58749d2..51b00e0 100644 --- a/config/zsh/.zshenv +++ b/config/zsh/.zshenv @@ -41,17 +41,3 @@ export ZLIB="${ZDOTDIR}/lib" export LANG='en_GB.UTF-8'; export LC_ALL='en_GB.UTF-8'; export PYTHONIOENCODING='UTF-8'; - -# Add Brew to path, if installed and on MacOS -if [ "$(uname -s)" = "Darwin" ] && [[ -d /opt/homebrew/bin ]]; then - export PATH=/opt/homebrew/bin:$PATH -fi - -# And Android SDK to path, if within Library direcroty -if [ "$(uname -s)" = "Darwin" ] && [[ -d "${HOME}/Library/Android/" ]]; then - export PATH="${HOME}/Library/Android/sdk/emulator:${PATH}" - export ANDROID_HOME="${HOME}/Library/Android/sdk" - export ANDROID_SDK_ROOT="${HOME}/Library/Android/sdk" - export ANDROID_AVD_HOME="${ANDROID_SDK_ROOT}/tools/emulator" - export NODE_BINARY="/usr/local/bin/node" -fi diff --git a/config/zsh/.zshrc b/config/zsh/.zshrc index 2a6b8e8..9c3cc43 100644 --- a/config/zsh/.zshrc +++ b/config/zsh/.zshrc @@ -16,6 +16,7 @@ source ${zsh_dir}/aliases/alias-tips.zsh # Setup Antigen, and import plugins source ${zsh_dir}/helpers/setup-antigen.zsh source ${zsh_dir}/helpers/import-plugins.zsh +source ${zsh_dir}/helpers/misc-stuff.zsh # Configure ZSH stuff source ${zsh_dir}/lib/colors.zsh @@ -37,12 +38,23 @@ source ${utils_dir}/am-i-online.sh source ${utils_dir}/welcome-banner.sh source ${utils_dir}/color-map.sh -# Left over tasks -source ${zsh_dir}/helpers/misc-stuff.zsh - # Import P10k config for command prompt, run `p10k configure` or edit [[ ! -f ${zsh_dir}/.p10k.zsh ]] || source ${zsh_dir}/.p10k.zsh +# Add Brew to path, if installed and on MacOS +if [ "$(uname -s)" = "Darwin" ] && [[ -d /opt/homebrew/bin ]]; then + export PATH=/opt/homebrew/bin:$PATH +fi + +# And Android SDK to path, if within Library direcroty +if [ "$(uname -s)" = "Darwin" ] && [[ -d "${HOME}/Library/Android/" ]]; then + export PATH="${HOME}/Library/Android/sdk/emulator:${PATH}" + export ANDROID_HOME="${HOME}/Library/Android/sdk" + export ANDROID_SDK_ROOT="${HOME}/Library/Android/sdk" + export ANDROID_AVD_HOME="${ANDROID_SDK_ROOT}/tools/emulator" + export NODE_BINARY="/usr/local/bin/node" +fi + # If not running in nested shell, then show welcome message :) if [[ "${SHLVL}" -lt 2 ]] && [[ -z "$SKIP_WELCOME" ]]; then welcome