zshrc added, restructrure

This commit is contained in:
Jie Feng 2017-08-09 16:16:48 +08:00
parent ad31d92edd
commit beeeffdc11
3 changed files with 15 additions and 3 deletions

View File

@ -58,7 +58,11 @@ task :install_zsh do
run %{ run %{
which zsh which zsh
if [ $? != 0 ]; then 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 fi
} }
end end
@ -304,7 +308,7 @@ def install_prezto
run %{ ln -nfs "$HOME/.yadr/zsh/prezto" "${ZDOTDIR:-$HOME}/.zprezto" } 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 # 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
puts "Overriding prezto ~/.zpreztorc with YADR's zpreztorc to enable additional modules..." puts "Overriding prezto ~/.zpreztorc with YADR's zpreztorc to enable additional modules..."

View File

@ -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

7
zsh/zshrc Normal file
View File

@ -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