dotfiles.2022/_home/dot_sz.shrc.d/21_aliases

17 lines
691 B
Plaintext
Raw Normal View History

alias sudo="/usr/bin/sudo "
PREFERED_VI=$(type -fP nvim vim | head -1)
[[ -z "$PREFERED_VI" ]] && PREFERED_VI=$(type -fP vi | head -1) || alias vi_editor="$PREFERED_VI -p "
[[ -z "$PREFERED_VI" ]] && alias vi_editor='eval $EDITOR ' || alias vi_editor="$PREFERED_VI "
alias nvim="vi_editor "
alias vim="vi_editor "
alias vi="vi_editor "
alias lessr="less --raw-control-chars "
alias ed="nvim "
alias sz-edshrc="ed ~/.sz.shrc.d ; exec $SHELL"
alias cz="chezmoi "
alias cz-refresh="chezmoi status | cut -d\ -f2 | grep '^\.sz\.shrc\.d' | xargs chezmoi forget --force; chezmoi add ~/.sz.shrc.d --recursive; chezmoi status; chezmoi git status"
alias cz-commit="chezmoi git -- commit -a "