X-Git-Url: https://git.sev.monster/~sev/dotfiles.git/blobdiff_plain/e69caf640e206d5736bbac8d9a6dd75e63ec70c0..6c74cef6ac35d25dd4991e7ff5cccada15eb0ffb:/etc/zsh/.zshrc diff --git a/etc/zsh/.zshrc b/etc/zsh/.zshrc index dd7d2dd..30625bd 100644 --- a/etc/zsh/.zshrc +++ b/etc/zsh/.zshrc @@ -142,8 +142,8 @@ if [[ "$OSTYPE" =~ '^(free|net)bsd' ]] { } else { alias ll='ls -lAFh' } -alias p=$PAGER -alias e=$EDITOR +alias p=\$PAGER +alias e=\$EDITOR alias se=sudoedit # be paranoid alias cp='cp -ip' @@ -191,11 +191,17 @@ unset ps ### specialized aliases ## go up directories function up { - cd $(printf '../%.0s' {1..${1:-1}}) + \cd $(printf '../%.0s' {1..${1:-1}}) } alias u=up ## zoxide -[[ -v commands[zoxide] ]] && eval "$(zoxide init zsh)" +if [[ -v commands[zoxide] ]] { + eval "$(zoxide init zsh)" + alias cd=z +} +## git +alias ga='git add' +alias gdh='git diff HEAD' ### hooks autoload -Uz add-zsh-hook @@ -308,10 +314,11 @@ autoload -Uz compinit cache=${XDG_CACHE_HOME:-~/.cache}/zsh [[ -d $cache ]] || mkdir -p $cache compinit -d $cache/.zcompdump +unset cache ### prompt autoload -Uz promptinit && promptinit prompt arrows ### load site-specific -if [[ -f ${ZDOTDIR:-~}/.zshrc.local ]] { source ${ZDOTDIR:-~}/.zshrc.local } +load-site-dotfile zshrc