From 043f2f899d8800d9b1ef063e4e1fa696eaf2c8c6 Mon Sep 17 00:00:00 2001 From: Derek Michael Frank Date: Sun, 17 Jul 2016 13:05:15 -0700 Subject: [PATCH] fix(zsh): Change project directory environment variable Using `$ZSH` for the project root directory conflicts with zsh projects and plugins (e.g., oh-my-zsh). Change `$ZSH` -> `$DOTFILES`. WIP: defrank/dotfiles#8/b --- bin/dot | 10 +++++----- bin/set-defaults | 4 ++-- git/gitconfig.symlink | 6 +++--- system/_path.zsh | 2 +- vim/vim.symlink/.netrwhist | 5 +++++ zsh/config.zsh | 4 ++-- zsh/fpath.zsh | 2 +- zsh/zshrc.symlink | 6 +++--- 8 files changed, 22 insertions(+), 17 deletions(-) create mode 100644 vim/vim.symlink/.netrwhist diff --git a/bin/dot b/bin/dot index 605b059..2bd020c 100755 --- a/bin/dot +++ b/bin/dot @@ -38,18 +38,18 @@ while test $# -gt 0; do shift done -export ZSH=$HOME/.dotfiles +export DOTFILES=$HOME/.dotfiles # Set macOS defaults -$ZSH/macos/set-defaults.sh +$DOTFILES/macos/set-defaults.sh # Install homebrew -$ZSH/homebrew/install.sh 2>&1 +$DOTFILES/homebrew/install.sh 2>&1 # Upgrade homebrew echo "› brew update" brew update # Install software -echo "› $ZSH/script/install" -$ZSH/script/install +echo "› $DOTFILES/script/install" +$DOTFILES/script/install diff --git a/bin/set-defaults b/bin/set-defaults index 3338596..b566e3f 100755 --- a/bin/set-defaults +++ b/bin/set-defaults @@ -1,5 +1,5 @@ #!/bin/sh # -# Sets macOS defaults by running $ZSH/macos/set-defaults.sh. +# Sets macOS defaults by running $DOTFILES/macos/set-defaults.sh. -exec $ZSH/macos/set-defaults.sh +exec $DOTFILES/macos/set-defaults.sh diff --git a/git/gitconfig.symlink b/git/gitconfig.symlink index c936c2b..05086ef 100644 --- a/git/gitconfig.symlink +++ b/git/gitconfig.symlink @@ -5,9 +5,9 @@ protocol = https [alias] co = checkout - promote = !$ZSH/bin/git-promote - wtf = !$ZSH/bin/git-wtf - rank-contributors = !$ZSH/bin/git-rank-contributors + promote = !$DOTFILES/bin/git-promote + wtf = !$DOTFILES/bin/git-wtf + rank-contributors = !$DOTFILES/bin/git-rank-contributors count = !git shortlog -sn [color] diff = auto diff --git a/system/_path.zsh b/system/_path.zsh index 255c2cf..ce76bd3 100644 --- a/system/_path.zsh +++ b/system/_path.zsh @@ -1,2 +1,2 @@ -export PATH="./bin:/usr/local/bin:/usr/local/sbin:$ZSH/bin:$PATH" +export PATH="./bin:/usr/local/bin:/usr/local/sbin:$DOTFILES/bin:$PATH" export MANPATH="/usr/local/man:/usr/local/mysql/man:/usr/local/git/man:$MANPATH" diff --git a/vim/vim.symlink/.netrwhist b/vim/vim.symlink/.netrwhist new file mode 100644 index 0000000..98877a4 --- /dev/null +++ b/vim/vim.symlink/.netrwhist @@ -0,0 +1,5 @@ +let g:netrw_dirhistmax =10 +let g:netrw_dirhist_cnt =3 +let g:netrw_dirhist_1='/Users/joey/code/activerecord-cockroachdb-adapter/rails' +let g:netrw_dirhist_2='/Users/joey/code/sonorian-sim/.git' +let g:netrw_dirhist_3='/Users/joey/.dotfiles/chunkwm' diff --git a/zsh/config.zsh b/zsh/config.zsh index 8ca7389..243cbf0 100644 --- a/zsh/config.zsh +++ b/zsh/config.zsh @@ -1,9 +1,9 @@ export LSCOLORS="exfxcxdxbxegedabagacad" export CLICOLOR=true -fpath=($ZSH/functions $fpath) +fpath=($DOTFILES/functions $fpath) -autoload -U $ZSH/functions/*(:t) +autoload -U $DOTFILES/functions/*(:t) HISTFILE=~/.zsh_history HISTSIZE=10000 diff --git a/zsh/fpath.zsh b/zsh/fpath.zsh index eaff4f4..5254cdb 100644 --- a/zsh/fpath.zsh +++ b/zsh/fpath.zsh @@ -1,2 +1,2 @@ #add each topic folder to fpath so that they can add functions and completion scripts -for topic_folder ($ZSH/*) if [ -d $topic_folder ]; then fpath=($topic_folder $fpath); fi; +for topic_folder ($DOTFILES/*) if [ -d $topic_folder ]; then fpath=($topic_folder $fpath); fi; diff --git a/zsh/zshrc.symlink b/zsh/zshrc.symlink index 9ce5583..b078443 100644 --- a/zsh/zshrc.symlink +++ b/zsh/zshrc.symlink @@ -1,5 +1,5 @@ -# shortcut to this dotfiles path is $ZSH -export ZSH=$HOME/.dotfiles +# shortcut to this dotfiles path is $DOTFILES +export DOTFILES=$HOME/.dotfiles # your project folder that we can `c [tab]` to export PROJECTS=~/Code @@ -14,7 +14,7 @@ fi # all of our zsh files typeset -U config_files -config_files=($ZSH/**/*.zsh) +config_files=($DOTFILES/**/*.zsh) # load the path files for file in ${(M)config_files:#*/path.zsh}