- add git aliases
- alias cd to zoxide if present
- escape parameter expansion on p/e so env changes are reflected
} 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'
### 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=zoxide
+}
+## git
+alias ga=git add
+alias gdh=git diff HEAD
### hooks
autoload -Uz add-zsh-hook