diff options
| author | LMBishop <13875753+LMBishop@users.noreply.github.com> | 2022-11-20 20:33:13 +0000 |
|---|---|---|
| committer | LMBishop <13875753+LMBishop@users.noreply.github.com> | 2022-11-20 20:33:13 +0000 |
| commit | 6b1b61f98813a58286e099d92767e01c2d40bc18 (patch) | |
| tree | a3613fba312e0f324bdbca28ec3d3d0b5e6f6e13 /zsh/.zshrc | |
| parent | 6a0e18aab79cefa8cd4917e9a6d121349f41eb3f (diff) | |
Redo deploy script
Diffstat (limited to 'zsh/.zshrc')
| -rw-r--r-- | zsh/.zshrc | 70 |
1 files changed, 23 insertions, 47 deletions
@@ -1,54 +1,30 @@ -export ZSH="/Users/leonardo/.oh-my-zsh" +# Source environment +source $HOME/.config/zsh/environment.zsh -DEFAULT_USER="leonardo" +# Load plugins +plugins=(git zsh-autosuggestions zsh-syntax-highlighting) -autoload -Uz vcs_info - -directory() { - echo "%{$fg_bold[magenta]%}%~%{$reset_color%}" -} - -current_time() { - echo "%{$fg[white]%}[%*]" -} - -return_status() { - local LAST_EXIT_CODE=$? - if [[ $LAST_EXIT_CODE -ne 0 ]]; then - local EXIT_CODE_PROMPT=' ' - EXIT_CODE_PROMPT+="%{$fg_bold[red]%}$LAST_EXIT_CODE%{$reset_color%}" - echo "$EXIT_CODE_PROMPT " - fi -} +source $ZSH/oh-my-zsh.sh -precmd() { - vcs_info - VCS_STATUS="" - if [[ -n ${vcs_info_msg_0_} ]]; then - STATUS=$(command git status --porcelain 2> /dev/null | tail -n1) - if [[ -n $STATUS ]]; then - VCS_STATUS="(%F{yellow}${vcs_info_msg_0_}%f) " - else - VCS_STATUS="(%F{green}${vcs_info_msg_0_}%f) " - fi +# Source configurations +typeset -ga sources +sources+="$ZSH_CONFIG/environment.zsh" +sources+="$ZSH_CONFIG/prompt.zsh" +sources+="$ZSH_CONFIG/aliases.zsh" + +foreach file (`echo $sources`) + if [[ -a $file ]]; then + source $file fi - PROMPT='%B$(directory)%b %# ' - RPROMPT='$(return_status)${VCS_STATUS}$(current_time)' -} +end -zstyle ':vcs_info:*' check-for-changes true -zstyle ':vcs_info:git*' formats "%b%u%c" -zstyle ':vcs_info:git*' actionformats "%b|%a%u%c" -zstyle ':vcs_info:*' unstagedstr ' *' -zstyle ':vcs_info:*' stagedstr ' +' +# =============================== +export NVM_DIR="$HOME/.nvm" +[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh" +[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" -setopt prompt_subst - -plugins=(git zsh-autosuggestions) - -source $ZSH/oh-my-zsh.sh +export PYENV_ROOT="$HOME/.pyenv" +command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH" +eval "$(pyenv init -)" +eval "$(pyenv virtualenv-init -)" -export PATH="/opt/homebrew/opt/python@3.10/bin:$PATH" -alias vim="nvim" -alias vi="nvim" -alias vimdiff="nvim -d" |
