ENH only make aliases when binaries exists
This commit is contained in:
parent
80d75659e9
commit
bb4d796ebe
|
@ -192,11 +192,17 @@ precmd () { echo -ne "\033]0;urxvt: ${PWD}\007" }
|
||||||
|
|
||||||
alias als='alias | grep'
|
alias als='alias | grep'
|
||||||
alias hs='history 1 | grep'
|
alias hs='history 1 | grep'
|
||||||
alias ls='ls --color'
|
|
||||||
|
|
||||||
alias grep='grep --color=auto'
|
alias grep='grep --color=auto'
|
||||||
alias sudo='sudo '
|
alias sudo='sudo '
|
||||||
|
|
||||||
|
if [ -e /bin/colordiff ]; then
|
||||||
alias diff=colordiff
|
alias diff=colordiff
|
||||||
|
else
|
||||||
|
alias diff='diff --color'
|
||||||
|
fi
|
||||||
|
|
||||||
|
alias ls='ls --color'
|
||||||
|
|
||||||
if [ -e /bin/exa ]; then
|
if [ -e /bin/exa ]; then
|
||||||
alias ll='exa -alhg --group-directories-first'
|
alias ll='exa -alhg --group-directories-first'
|
||||||
|
@ -246,6 +252,7 @@ alias scus="systemctl --user start"
|
||||||
alias scut="systemctl --user stop"
|
alias scut="systemctl --user stop"
|
||||||
alias scur="systemctl --user restart"
|
alias scur="systemctl --user restart"
|
||||||
|
|
||||||
|
if [ -e /bin/git ]; then
|
||||||
alias g='git'
|
alias g='git'
|
||||||
alias gcl='git clone'
|
alias gcl='git clone'
|
||||||
alias ga='git add'
|
alias ga='git add'
|
||||||
|
@ -273,12 +280,15 @@ alias gw="git whatchanged"
|
||||||
alias gt="git tag"
|
alias gt="git tag"
|
||||||
alias gnew="git log HEAD@{1}..HEAD@{0}"
|
alias gnew="git log HEAD@{1}..HEAD@{0}"
|
||||||
alias ggui="git gui"
|
alias ggui="git gui"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -e /bin/chezmoi ]; then
|
||||||
alias cze="chezmoi edit"
|
alias cze="chezmoi edit"
|
||||||
alias czea="chezmoi edit --apply"
|
alias czea="chezmoi edit --apply"
|
||||||
alias czd="chezmoi diff"
|
alias czd="chezmoi diff"
|
||||||
alias cza="chezmoi add"
|
alias cza="chezmoi add"
|
||||||
alias czc="chezmoi cd"
|
alias czc="chezmoi cd"
|
||||||
|
fi
|
||||||
|
|
||||||
## --------------------------------------------------
|
## --------------------------------------------------
|
||||||
## Manly Colors
|
## Manly Colors
|
||||||
|
|
Loading…
Reference in New Issue