annotate zshrc-gentoo @ 130:ca2b58d0a32f

EPM_LOCATION -> EX_LOCATION
author Dirk Olmes <dirk@xanthippe.ping.de>
date Fri, 09 Mar 2018 16:03:11 +0100
parents 68edc97253fa
children 75e3f2d8368c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
1 #
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
2 # zshrc-gentoo: gentoo specific initialization
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
3 #
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
4
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
5 # keychain setup: authenticate to remote hosts only once
1
e12c50e8ea8c use the builtin HOST variable
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 0
diff changeset
6 local keychain_init_file=$HOME/.keychain/${HOST}-sh
0
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
7 if [ -r ${keychain_init_file} ]; then
72
42efae6b3fe2 source the keychain gpg file separately
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 67
diff changeset
8 . ${keychain_init_file}
42efae6b3fe2 source the keychain gpg file separately
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 67
diff changeset
9 fi
42efae6b3fe2 source the keychain gpg file separately
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 67
diff changeset
10 keychain_init_file=$HOME/.keychain/${HOST}-sh-gpg
42efae6b3fe2 source the keychain gpg file separately
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 67
diff changeset
11 if [ -r ${keychain_init_file} ]; then
0
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
12 . ${keychain_init_file}
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
13 fi
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
14
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
15 # custom environment variables
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
16 export EDITOR=/usr/bin/nano
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
17 export PATH="${PATH}":/opt/bin
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
18
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
19 # custom aliases for gentoo
54
556b1cef101f add alias for cd
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 52
diff changeset
20 alias cd..="cd .."
0
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
21 alias es="ionice -c3 emerge --sync"
112
68edc97253fa fix the path to grub.cfg
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 106
diff changeset
22 alias gmkc="grub-mkconfig -o /boot/grub/grub.cfg"
55
bc9e88b0be4a add an alias for less
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 54
diff changeset
23 alias les="less"
95
efa07c8367eb remove the -t option for world updates - too much clutter
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 80
diff changeset
24 alias wu="emerge -uvDa world"
52
1e38ed9eb354 add alias for xmodmap
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 44
diff changeset
25 alias xm="xmodmap ~/.Xmodmap"
0
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
26
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
27 # custom functions for gentoo
73
a48ea5d61dee add alias for printing all IP addresses
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 72
diff changeset
28 ipa() {
a48ea5d61dee add alias for printing all IP addresses
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 72
diff changeset
29 CMD="ip addr show"
a48ea5d61dee add alias for printing all IP addresses
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 72
diff changeset
30 if [ $# -gt 0 ]; then
a48ea5d61dee add alias for printing all IP addresses
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 72
diff changeset
31 CMD="$CMD dev $1"
a48ea5d61dee add alias for printing all IP addresses
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 72
diff changeset
32 fi
a48ea5d61dee add alias for printing all IP addresses
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 72
diff changeset
33 eval $CMD
a48ea5d61dee add alias for printing all IP addresses
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 72
diff changeset
34 }
1
e12c50e8ea8c use the builtin HOST variable
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 0
diff changeset
35 kcs() { source $HOME/.keychain/${HOST}-sh }
0
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
36 ll() { /usr/bin/env -u LC_ALL LANG=C ls -laFh "$@" | more }
8b245298349a zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
37 lr() { /usr/bin/env -u LC_ALL LANG=C ls -rtlh "$@" }
18
e8f909f0fb6f rename the svc alias to "service": this is in line with what CentOS uses and has autocomplete enabled already
Dirk Olmes <dirk@xanthippe.ping.de>
parents: 1
diff changeset
38 service() { /etc/init.d/"$@" }