add zshrc
This commit is contained in:
parent
f443da5f31
commit
84471bec5d
2 changed files with 39 additions and 4 deletions
|
@ -77,7 +77,7 @@ else
|
||||||
# with git and then fallback to tarball.
|
# with git and then fallback to tarball.
|
||||||
if has git; then
|
if has git; then
|
||||||
note "Cloning from git..."
|
note "Cloning from git..."
|
||||||
git clone $gitbase $basedir
|
git clone --single-branch --branch $gitbranch $gitbase $basedir
|
||||||
cd $basedir
|
cd $basedir
|
||||||
git submodule init
|
git submodule init
|
||||||
git submodule update --init --recursive
|
git submodule update --init --recursive
|
||||||
|
@ -93,12 +93,13 @@ for path in * ; do
|
||||||
if [ $(expr match $path '^_') -eq 1 ]; then
|
if [ $(expr match $path '^_') -eq 1 ]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
echo link $basedir/$path $HOME/.$path
|
link $basedir/$path $homedir/.$path
|
||||||
done
|
done
|
||||||
|
|
||||||
mkdir -p $HOME/.config
|
mkdir -p $homedir/.config
|
||||||
for path in _config/*; do
|
for path in _config/*; do
|
||||||
echo link $basedir/_config/$path $HOME/.config/$path
|
path=${path##*/}
|
||||||
|
link $basedir/_config/$path $homedir/.config/${path}
|
||||||
done
|
done
|
||||||
|
|
||||||
note "Done."
|
note "Done."
|
||||||
|
|
34
zshrc
Normal file
34
zshrc
Normal file
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue