From beeeffdc11a3086533a5697bdd249d15df5ddbb5 Mon Sep 17 00:00:00 2001 From: Jie Feng Date: Wed, 9 Aug 2017 16:16:48 +0800 Subject: [PATCH] zshrc added, restructrure --- Rakefile | 8 ++++++-- zsh/node_path.zsh | 3 ++- zsh/zshrc | 7 +++++++ 3 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 zsh/zshrc diff --git a/Rakefile b/Rakefile index 73f1b8f..e947c64 100644 --- a/Rakefile +++ b/Rakefile @@ -58,7 +58,11 @@ task :install_zsh do run %{ which zsh if [ $? != 0 ]; then - sudo apt install zsh -y + if [ "$(uname)" == "Darwin" ]; then + brew install zsh + elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then + apt install zsh -y + fi fi } end @@ -304,7 +308,7 @@ def install_prezto run %{ ln -nfs "$HOME/.yadr/zsh/prezto" "${ZDOTDIR:-$HOME}/.zprezto" } # The prezto runcoms are only going to be installed if zprezto has never been installed - install_files(Dir.glob('zsh/prezto/runcoms/z*'), :symlink) + install_files(Dir.glob('zsh/prezto/runcoms/z*').concat(['zsh/zshrc']), :symlink) puts puts "Overriding prezto ~/.zpreztorc with YADR's zpreztorc to enable additional modules..." diff --git a/zsh/node_path.zsh b/zsh/node_path.zsh index 5b3fcc5..cfa7486 100644 --- a/zsh/node_path.zsh +++ b/zsh/node_path.zsh @@ -1 +1,2 @@ -export PATH=node_modules/.bin:$PATH +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm diff --git a/zsh/zshrc b/zsh/zshrc new file mode 100644 index 0000000..029a3e4 --- /dev/null +++ b/zsh/zshrc @@ -0,0 +1,7 @@ +# Source Prezto. +if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then + source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" +fi + +# Customize to your needs... +for config_file ($HOME/.yadr/zsh/*.zsh) source $config_file