diff --git a/.gitignore b/.gitignore index af80867..e050687 100644 --- a/.gitignore +++ b/.gitignore @@ -26,4 +26,7 @@ Icon .AppleDesktop Network Trash Folder Temporary Items -.apdisk \ No newline at end of file +.apdisk + +# Antigen binaries +*.zwc diff --git a/brew/Brewfile b/brew/Brewfile index 82a8b59..ce442dd 100644 --- a/brew/Brewfile +++ b/brew/Brewfile @@ -1,4 +1,5 @@ # install deps +brew "antigen" brew "coreutils" brew "git" brew "hub" @@ -7,10 +8,6 @@ brew "nvm" brew "thefuck" brew "trash" brew "tree" -brew "z" -brew "zsh-autosuggestions" -brew "zsh-git-prompt" -brew "zsh-syntax-highlighting" # set up cask tap "caskroom/cask" diff --git a/system/.alias b/system/.alias index 1dbb9a9..4ead776 100644 --- a/system/.alias +++ b/system/.alias @@ -22,6 +22,7 @@ alias tree="tree -FC --filelimit=100 --dirsfirst --prune" # shorter git alias g="git" + # alias `hub` to `git` eval "$(hub alias -s)" diff --git a/system/.env b/system/.env index 6b6a549..d71a1ed 100644 --- a/system/.env +++ b/system/.env @@ -1,7 +1,9 @@ # Add Homebrew deps to path PATH="/usr/local/bin:/usr/local/sbin:~/bin:$PATH" + # Remove dupes - https://unix.stackexchange.com/questions/40749/remove-duplicate-path-entries-with-awk-command/40755#40755 PATH=`echo -n $PATH | awk -v RS=: '{ if (!arr[$0]++) {printf("%s%s",!ln++?"":":",$0)}}'` + # Set the thing export PATH @@ -21,10 +23,13 @@ export _Z_CMD="j" # set nvm dir export NVM_DIR="$HOME/.nvm" + # actually load nvm source /usr/local/opt/nvm/nvm.sh + # automatically switch nvm versions (.nvmrc) autoload -U add-zsh-hook + load-nvmrc() { local node_version="$(nvm version)" local nvmrc_path="$(nvm_find_nvmrc)" @@ -40,5 +45,7 @@ load-nvmrc() { nvm use default fi } + add-zsh-hook chpwd load-nvmrc + load-nvmrc diff --git a/system/.function b/system/.function index 2e06ee2..95ebe24 100644 --- a/system/.function +++ b/system/.function @@ -7,11 +7,6 @@ c() { fi } -# Calculator -calc() { - echo "$*" | bc -l; -} - # Show files on `cd` cd() { builtin cd "$@" && ls diff --git a/system/.plugins b/system/.plugins index a33f802..7acc22f 100644 --- a/system/.plugins +++ b/system/.plugins @@ -1,11 +1,23 @@ # enable completion autoload -Uz compinit && compinit -# z - jump around -source /usr/local/etc/profile.d/z.sh +# +# antigen plugins +# +source /usr/local/share/antigen/antigen.zsh -# autosuggestions -source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh +# oh-my-zsh plugins +antigen use oh-my-zsh -# syntax highlighting (should go last) -source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh \ No newline at end of file +antigen bundle command-not-found +antigen bundle git-prompt + +# standalone plugins +antigen bundle ael-code/zsh-colored-man-pages +antigen bundle arzzen/calc.plugin.zsh +antigen bundle rupa/z +antigen bundle zsh-users/zsh-autosuggestions +antigen bundle zsh-users/zsh-syntax-highlighting + +# load plugins +antigen apply diff --git a/system/.prompt b/system/.prompt index 772a9d1..e84595a 100644 --- a/system/.prompt +++ b/system/.prompt @@ -1,6 +1,3 @@ -# git prompt -source /usr/local/opt/zsh-git-prompt/zshrc.sh - ZSH_THEME_GIT_PROMPT_PREFIX="$reset_color at " ZSH_THEME_GIT_PROMPT_SUFFIX=")" ZSH_THEME_GIT_PROMPT_SEPARATOR="(" @@ -15,4 +12,5 @@ ZSH_THEME_GIT_PROMPT_CLEAN="%{✔%G%}" local dir="%{$fg_bold[white]%}%1~$reset_color" -export PS1='$dir$(git_super_status) %{$fg_bold[white]%}→$reset_color ' +PS1='$dir$(git_super_status) %{$fg_bold[white]%}→$reset_color ' +RPROMPT=''