zshrc/linux.zsh

47 lines
1.4 KiB
Bash
Raw Normal View History

2011-04-11 22:47:38 +02:00
# activate ls colors, (private if possible)
if [[ -a $HOME/.dir_colors ]]; then
if [[ "$TERM" == *256* ]]; then
which dircolors > /dev/null && eval "`dircolors -b $HOME/.dir_colors`"
else
# standard colors for non-256-color terms
which dircolors > /dev/null && eval "`dircolors -b`"
fi
else
which dircolors > /dev/null && eval "`dircolors -b`"
fi
2012-05-01 10:18:08 +02:00
alias up=" nmcli con up id"
alias down=" nmcli con down id"
LSB_DISTRIBUTOR=`lsb_release -i -s`
2012-04-16 23:05:19 +02:00
# debian and ubuntu specific aliases
2011-04-12 19:45:36 +02:00
## autocomplete-able apt-xxx aliases
2012-05-01 10:18:08 +02:00
if [[ "$LSB_DISTRIBUTOR" == "Ubuntu" ]]; then
alias acs='apt-cache show'
alias agi='sudo apt-get install'
alias ag='sudo apt-get'
alias agu='sudo apt-get update'
alias agug='sudo apt-get upgrade'
alias aguu='agu && agug'
alias agr='sudo apt-get uninstall'
alias agp='sudo apt-get purge'
alias aga='sudo apt-get autoremove'
alias ctl='sudo service '
alias feierabend='sudo shutdown -h now'
fi
# arch linux with systemd aliases
if [[ "$LSB_DISTRIBUTOR" == "archlinux" ]]; then
# statements
alias ctl='sudo systemctl '
2012-07-16 21:58:53 +02:00
alias feierabend='sudo systemctl start poweroff.target'
2012-05-01 10:18:08 +02:00
alias start=" sudo systemctl start"
alias stop=" sudo systemctl stop"
alias status=" sudo systemctl status"
alias restart=" sudo systemctl restart"
alias reboot="sudo systemctl start reboot.target"
fi
2012-04-16 23:05:19 +02:00