Mercurial > hg > zsh-env
annotate zshrc-gentoo @ 80:fbf374902161
add -t for the world update
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Wed, 26 Aug 2015 10:11:27 +0200 |
parents | a48ea5d61dee |
children | efa07c8367eb |
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 | 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" |
55 | 22 alias les="less" |
80
fbf374902161
add -t for the world update
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
73
diff
changeset
|
23 alias wu="emerge -tuvDa world" |
52 | 24 alias xm="xmodmap ~/.Xmodmap" |
0
8b245298349a
zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
25 |
8b245298349a
zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
26 # custom functions for gentoo |
73
a48ea5d61dee
add alias for printing all IP addresses
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
72
diff
changeset
|
27 ipa() { |
a48ea5d61dee
add alias for printing all IP addresses
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
72
diff
changeset
|
28 CMD="ip addr show" |
a48ea5d61dee
add alias for printing all IP addresses
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
72
diff
changeset
|
29 if [ $# -gt 0 ]; then |
a48ea5d61dee
add alias for printing all IP addresses
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
72
diff
changeset
|
30 CMD="$CMD dev $1" |
a48ea5d61dee
add alias for printing all IP addresses
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
72
diff
changeset
|
31 fi |
a48ea5d61dee
add alias for printing all IP addresses
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
72
diff
changeset
|
32 eval $CMD |
a48ea5d61dee
add alias for printing all IP addresses
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
72
diff
changeset
|
33 } |
1
e12c50e8ea8c
use the builtin HOST variable
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
0
diff
changeset
|
34 kcs() { source $HOME/.keychain/${HOST}-sh } |
0
8b245298349a
zsh environment - initial import
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
35 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
|
36 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
|
37 service() { /etc/init.d/"$@" } |