From aed6a9398a2c3333ec7f26157ce6a4a83e0dfcec Mon Sep 17 00:00:00 2001 From: William Carroll Date: Mon, 8 Jan 2018 15:40:47 -0500 Subject: [PATCH] Update zsh configs for env vars, etc Security measures are in place to protect env vars that contain sensitive data. --- configs/shared/.zsh_profile | 15 +++++++++++++++ configs/shared/.zshrc | 10 ++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/configs/shared/.zsh_profile b/configs/shared/.zsh_profile index 63f640f44..07bc14c9a 100644 --- a/configs/shared/.zsh_profile +++ b/configs/shared/.zsh_profile @@ -1,14 +1,29 @@ export PATH=$HOME/bin:/opt/local/bin:/opt/local/sbin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/opt/fzf/bin:$HOME/n/bin:$HOME/.cargo/bin +# export the path this repository +export PC_SETTINGS_PATH=$HOME/pc_settings + + # use emacs bindings (default) for terminal input set -o emacs +# Configure default editor +command -v nvim >/dev/null && \ + export EDITOR=nvim || \ + export EDITOR=vim + + # iex and erl shared interactive shell history export ERL_AFLAGS="-kernel shell_history enabled" +# drone env variables +export DRONE_SERVER="https://ci.urbinternal.com" +export DRONE_TOKEN=$(<"${PC_SETTINGS_PATH}/configs/secrets/drone_token.txt") + + source $HOME/pc_settings/aliases.sh source $HOME/pc_settings/functions/index.sh source $HOME/pc_settings/scripts/setup_keybindings.sh diff --git a/configs/shared/.zshrc b/configs/shared/.zshrc index 58408271e..6e658292c 100644 --- a/configs/shared/.zshrc +++ b/configs/shared/.zshrc @@ -1,6 +1,6 @@ -export ZSH=/Users/wpcarro/.oh-my-zsh +export ZSH=${HOME}/.oh-my-zsh -ZSH_THEME="spaceship" +ZSH_THEME="refined" plugins=(tmux zsh-autosuggestions git git-extras github gitfast) source $ZSH/oh-my-zsh.sh source ~/.zsh_profile @@ -8,3 +8,9 @@ source ~/.zsh_profile [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh export N_PREFIX="$HOME/n"; [[ :$PATH: == *":$N_PREFIX/bin:"* ]] || PATH+=":$N_PREFIX/bin" # Added by n-install (see http://git.io/n-install-repo). + +# The next line updates PATH for the Google Cloud SDK. +if [ -f '/Users/wpcarro/Downloads/google-cloud-sdk/path.zsh.inc' ]; then source '/Users/wpcarro/Downloads/google-cloud-sdk/path.zsh.inc'; fi + +# The next line enables shell command completion for gcloud. +if [ -f '/Users/wpcarro/Downloads/google-cloud-sdk/completion.zsh.inc' ]; then source '/Users/wpcarro/Downloads/google-cloud-sdk/completion.zsh.inc'; fi