X-Git-Url: https://git.sev.monster/~sev/dotfiles.git/blobdiff_plain/8d4a98e19ec40334ed8e8f2ce4e5a9f094bdbcaf..6c74cef6ac35d25dd4991e7ff5cccada15eb0ffb:/etc/zsh/.zshrc?ds=inline diff --git a/etc/zsh/.zshrc b/etc/zsh/.zshrc index 5ca4858..30625bd 100644 --- a/etc/zsh/.zshrc +++ b/etc/zsh/.zshrc @@ -25,7 +25,7 @@ export SAVEHIST=1000 ## python export PYTHONSTARTUP=${XDG_CONFIG_HOME:-~/.config}/pythonrc ## vim -export VIMINIT='execute "source" ($XDG_CONFIG_HOME??($HOME."/.config"))."/vim/.vimrc"' +export VIMINIT='let$MYVIMRC=($XDG_CONFIG_HOME??($HOME."/.config"))."/vim/.vimrc"|execute"source"$MYVIMRC' ## wayland/sway # XXX: only do this if we're actually in wayland, but without a start script export XDG_SESSION_TYPE=wayland @@ -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,12 +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 } - -# vim: et sts=4 sw=4 ts=8 tw=79 +load-site-dotfile zshrc