X-Git-Url: https://git.sev.monster/~sev/dotfiles.git/blobdiff_plain/54a85d6c6744df54af2c092234ba84baacdc5ebc..6c74cef6ac35d25dd4991e7ff5cccada15eb0ffb:/etc/zsh/.zshrc diff --git a/etc/zsh/.zshrc b/etc/zsh/.zshrc index 5b9c79a..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 @@ -315,4 +321,4 @@ autoload -Uz promptinit && promptinit prompt arrows ### load site-specific -if [[ -f ${ZDOTDIR:-~}/.zshrc.local ]] { source ${ZDOTDIR:-~}/.zshrc.local } +load-site-dotfile zshrc