diff --git a/_install.sh b/_install.sh index 814a4cb..d05e507 100755 --- a/_install.sh +++ b/_install.sh @@ -77,7 +77,7 @@ else # with git and then fallback to tarball. if has git; then note "Cloning from git..." - git clone $gitbase $basedir + git clone --single-branch --branch $gitbranch $gitbase $basedir cd $basedir git submodule init git submodule update --init --recursive @@ -93,12 +93,13 @@ for path in * ; do if [ $(expr match $path '^_') -eq 1 ]; then continue fi - echo link $basedir/$path $HOME/.$path + link $basedir/$path $homedir/.$path done -mkdir -p $HOME/.config +mkdir -p $homedir/.config for path in _config/*; do - echo link $basedir/_config/$path $HOME/.config/$path + path=${path##*/} + link $basedir/_config/$path $homedir/.config/${path} done note "Done." diff --git a/zshrc b/zshrc new file mode 100644 index 0000000..8594d09 --- /dev/null +++ b/zshrc @@ -0,0 +1,34 @@ +# vim:set ft=zsh: + +# options +setopt AUTO_CD # If command typed is a directory, auto change to it +setopt HIST_IGNORE_DUPS # Ignore duplicate history entries +setopt HIST_REDUCE_BLANKS # Reduce blacks from commands in history +setopt EXTENDED_HISTORY # Include more information about command executed, etc +setopt COMPLETE_IN_WORD # Allow completion from within a word/phrase +setopt PROMPT_SUBST # Enable parameter expansion, etc. in prompt + +# aliases +alias retheme='wal -q -t -i ~/wallpaper' +alias sudo='sudo ' +alias tmux='TERM=xterm-256color tmux' +alias svim='sudo vim' +alias ll='ls -alF' +alias la='ls -A' +alias grep='grep --color=auto' +alias egrep='egrep --color=auto' +alias edit='${EDITOR:-vim}' + +local _configpath=~/.config/zsh/configs +for group in default ${HOST}; do + local _grouppath=$_configpath/$group + if [[ -d $_grouppath ]]; then + for cfg in $_grouppath/*.zsh; do + source $cfg + done + fi +done + +[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh +[ -f ~/.zshrc.local ] && source ~/.zshrc.local +[ -f ~/.aliases ] && source ~/.aliases