...
 
Commits (2)
......@@ -10,7 +10,7 @@
command="$0"
root="$HOME/.dotfiles"
#logfile="$root/dotfiles.log"
functions="$root/zfunctions"
plugins="$root/zsh"
timestamp=$(date +"%Y%m%d%H%M")
repo="https://socialg.it/david/dotfiles.git"
debug=1
......@@ -90,14 +90,17 @@ output=""; output=$(git clone $repo $root 2>&1); failsafe $? $output
message i "Cloned git repository into $root."
# create zshfunctions folder [.zfunctions]
cleanup $functions
output=""; output=$(mkdir -p $functions 2>&1); failsafe $? $output
message i "Created functions folder[$functions]."
#cleanup $plugins
message d "Attempting to create functions directory[$plugins]."
if [ ! -d $plugins ]; then
output=""; output=$(mkdir $plugins 2>&1); failsafe $? $output
fi
message i "Created functions folder[$plugins]."
# download pure
output=""; output=$(wget https://github.com/sindresorhus/pure/blob/master/pure.zsh -o $functions/pure.zsh 2>&1); failsafe $? $output
output=""; output=$(wget https://github.com/sindresorhus/pure/blob/master/async.zsh -o $functions/async.zsh 2>&1); failsafe $? $output
message i "Downloaded ZSH plugins into functions folder[$functions]."
output=""; output=$(wget -O $plugins/pure.zsh https://raw.githubusercontent.com/sindresorhus/pure/master/pure.zsh 2>&1); failsafe $? $output
output=""; output=$(wget -O $plugins/async.zsh https://raw.githubusercontent.com/sindresorhus/pure/master/async.zsh 2>&1); failsafe $? $output
message i "Downloaded ZSH plugins into functions folder[$plugins]."
# link .zshrc
cleanup "$HOME/.zshrc"
......
......@@ -5,9 +5,11 @@ if [ $? -eq 1 ]; then
fi
# load plugins
for plugin ($HOME/.dotfiles/zsh/*.zsh); do
source $plugin
done
# pure & zfunctions
fpath=("$HOME/.dotfiles/zfunctions" $fpath)
autoload -U promptinit; promptinit
prompt pure
......