[zsh] Add support for non GNU tools

This commit is contained in:
lhark 2020-01-19 21:34:03 -05:00
parent 39945f660c
commit 741ff313a1

50
aliases
View file

@ -2,26 +2,37 @@
# Aliases #
###########
alias acs='apt-cache search'
alias ls='ls --classify --tabsize=0 --literal --color=auto --show-control-chars -h'
# Detect if we have GNU coreutils or BSD
if date --version > /dev/null 2>&1 ;then
alias ls='ls --classify --tabsize=0 --literal --color=auto --show-control-chars -h'
alias diff='diff -u --color'
alias less='less --quiet'
alias grep="grep --color"
alias rm='rm -I'
alias ip='ip --color'
alias ipa='ip route && echo && ip --brief address'
alias ipr='ip --brief address && echo && ip route'
else
alias ipa='ip address'
alias ipa='ip route'
fi
if which sl > /dev/null 2>&1; then
alias l='sl'
alias lll='sl'
fi
case $(lsb_release -i | awk -F ':\t' '/Distributor ID/{print $2}') in
Arch)
alias upgrade='sudo pacman -Syu';;
Debian|Ubuntu)
alias upgrade='sudo apt-get update && sudo apt-get -dy dist-upgrade && sudo apt-get dist-upgrade';;
VoidLinux)
alias upgrade='sudo xbps-install -Su';;
esac
alias ll='ls -lha'
alias l='sl'
alias lll='sl'
alias less='less --quiet'
alias df='df --human-readable'
alias du='du --human-readable'
alias diff='diff -u --color'
# alias mutt='mutt -y'
alias upgrade='sudo apt-get update && sudo apt-get -dy dist-upgrade && sudo apt-get dist-upgrade'
alias feh='feh --auto-rotate'
# alias -g GP='|grep '
alias grep="grep --color"
alias ssh='ssh -A'
# alias -s txt=cat
alias rm='rm -I'
alias ip='ip --color'
alias ipa='ip route && echo && ip --brief address'
alias ipr='ip --brief address && echo && ip route'
alias df='df -h'
alias du='du -h'
alias neomutt='pushd $HOME; neomutt; popd'
alias feh="feh -. --auto-rotate --action1 'dragon -x %F'"
alias which='which -a'
# The infamous cd ...etc
alias -g ...='../..'
@ -32,7 +43,6 @@ alias -g .......='../../../../../..'
alias -g ........='../../../../../../..'
# Hackish tweaks
alias steam-wine="WINEDEBUG=-all wine $WINEPREFIX/drive_c/Program\ Files\ \(x86\)/Steam/Steam.exe -no-dwrite -no-cef-sandbox &"
alias pacaur='AURDEST=$HOME/aur pacaur'
alias redwm='cd ~/aur/dwm-git; updpkgsums; makepkg -fi --noconfirm; killall dwm'
alias minecraft='java -jar $HOME/.minecraft/launcher.jar'
alias rot13="tr '[A-Za-z]' '[N-ZA-Mn-za-m]'"