Compare commits

...

2 Commits

Author SHA1 Message Date
juan 19f3be856d better zz and zc alias 2021-08-19 18:22:02 +08:00
juan cef516a84e change fasd to z and remove thefuck 2021-08-19 18:10:24 +08:00
1 changed files with 7 additions and 13 deletions

20
.zshrc
View File

@ -62,19 +62,12 @@ autoload edit-command-line
zle -N edit-command-line
bindkey '' edit-command-line
#TheFuck plugin
fuck_cache="$HOME/.cache/thefuck"
test -f $fuck_cache || thefuck --alias pls >| "$fuck_cache"
source "$fuck_cache"
unset fuck_cache
#source fasd_cache for 40 ms quicker start.
fasd_cache="$HOME/.cache/fasd_cache"
if [ "$(command -v fasd)" -nt "$fasd_cache" -o ! -s "$fasd_cache" ]; then
fasd --init zsh-hook zsh-ccomp zsh-ccomp-install zsh-wcomp zsh-wcomp-install posix-alias posix-hook >| "$fasd_cache"
fi
source "$fasd_cache"
unset fasd_cache
export _Z_DATA="$HOME/.cache/z"
. $HOME/.cache/z.sh
zz () {
cd `z -l $* | fzf | awk '{print $2}'`
}
alias zc="z -c"
#use lf to change dirs. credit: luke
lfcd () {
@ -120,6 +113,7 @@ export LESS="-RSM~"
#local path
export PATH="${PATH}:${HOME}/.local/bin/"
export PATH="${PATH}:${HOME}/.scripts/"
export MANPATH="${MANPATH}:${HOME}/.local/share/man"
#ccache support
export USE_CCACHE=1