view zshrc-gentoo @ 141:fe986adeadeb

add more helper functions
author Dirk Olmes <dirk@xanthippe.ping.de>
date Thu, 05 Jul 2018 04:58:14 +0200
parents 68edc97253fa
children 75e3f2d8368c
line wrap: on
line source

#
# zshrc-gentoo: gentoo specific initialization
#

# keychain setup: authenticate to remote hosts only once
local keychain_init_file=$HOME/.keychain/${HOST}-sh
if [ -r ${keychain_init_file} ]; then
	. ${keychain_init_file}
fi
keychain_init_file=$HOME/.keychain/${HOST}-sh-gpg
if [ -r ${keychain_init_file} ]; then
    . ${keychain_init_file}
fi

# custom environment variables
export EDITOR=/usr/bin/nano
export PATH="${PATH}":/opt/bin

# custom aliases for gentoo
alias cd..="cd .."
alias es="ionice -c3 emerge --sync"
alias gmkc="grub-mkconfig -o /boot/grub/grub.cfg"
alias les="less"
alias wu="emerge -uvDa world"
alias xm="xmodmap ~/.Xmodmap"

# custom functions for gentoo
ipa() {
	CMD="ip addr show"
	if [ $# -gt 0 ]; then
		CMD="$CMD dev $1"
	fi
	eval $CMD
}
kcs() { source $HOME/.keychain/${HOST}-sh }
ll() { /usr/bin/env -u LC_ALL LANG=C ls -laFh "$@" | more }
lr() { /usr/bin/env -u LC_ALL LANG=C ls -rtlh "$@" }
service() { /etc/init.d/"$@" }