Skip to content

Commit

Permalink
Make terminal work in vscode and beyond
Browse files Browse the repository at this point in the history
This has been a pain since this repo was created, but it turns out the
bug is related to antigen application. If we apply everytime, we ensure
oh-my-zsh is loaded correctly and themes work. While we're here, I also
sourced the nvm plugin from oh-my-zsh, and removed and removed avn.
  • Loading branch information
gmcgibbon committed Nov 20, 2024
1 parent ef69012 commit 0453f24
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 55 deletions.
22 changes: 0 additions & 22 deletions zsh/nvm-hook

This file was deleted.

20 changes: 0 additions & 20 deletions zsh/themes/sparkle.zsh

This file was deleted.

26 changes: 26 additions & 0 deletions zsh/themes/sparkle.zsh-theme
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
function ssh_connection() {
if [[ -n $SSH_CONNECTION ]]; then
return "${BOLD_MAGENTA}(ssh) "
fi
}

BOLD_MAGENTA="%{%B%F{magenta}%}"
BOLD_YELLOW="%{%B%F{yellow}%}"
BOLD_GREY="%{%B%F{#566573}%}"
BOLD_WHITE="%{%B%F{white}%}"
BOLD_RED="%{%B%F{red}%}"
CLEAR="%{%f%k%b%}"


PROMPT='%{$(ssh_connection)%}'
PROMPT+=""
PROMPT+="${BOLD_YELLOW}%c${CLEAR} "
PROMPT+='$(git_prompt_info)'
PROMPT+="${BOLD_GREY}[%?] "
PROMPT+="${BOLD_WHITE}# "
PROMPT+="${CLEAR}"

ZSH_THEME_GIT_PROMPT_PREFIX="${BOLD_RED}<"
ZSH_THEME_GIT_PROMPT_SUFFIX="> ${CLEAR}"
ZSH_THEME_GIT_PROMPT_DIRTY=":✘"
ZSH_THEME_GIT_PROMPT_CLEAN=":✔"
21 changes: 8 additions & 13 deletions zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,15 @@

source ~/.zsh/antigen/bin/antigen.zsh

if [[ $ANTIGEN_APPLIED != true ]]; then
antigen use oh-my-zsh
antigen bundle git
antigen bundle zsh-users/zsh-autosuggestions
antigen bundle zsh-users/zsh-syntax-highlighting
antigen apply
fi
export ANTIGEN_APPLIED=true

source ~/.zsh/themes/sparkle.zsh
antigen use oh-my-zsh
antigen bundle git
antigen bundle nvm
antigen bundle zsh-users/zsh-completions
antigen bundle zsh-users/zsh-autosuggestions
antigen bundle zsh-users/zsh-syntax-highlighting
antigen apply

source ~/.zsh/themes/sparkle.zsh-theme
source ~/.bashrc

source ~/.zsh/nvm-hook

[[ -f ~/.zshrc.local ]] && source ~/.zshrc.local
[[ -s "$HOME/.avn/bin/avn.sh" ]] && source "$HOME/.avn/bin/avn.sh" # load avn

0 comments on commit 0453f24

Please # to comment.