-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.shell_common
55 lines (46 loc) · 1.33 KB
/
.shell_common
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# -*- mode: sh; -*-
# set up editor
export EDITOR='emacsclient --alternate-editor="" -nw'
export GOPATH="${HOME}"/goproj
export PATH=${GOPATH}/bin:${PATH}
# set up platform specific stuff
case "$OSTYPE" in
linux*)
export PATH="${HOME}/bin":${PATH}
;;
darwin*)
alias emacs="/Applications/Emacs.app/Contents/MacOS/Emacs"
export PATH="/Applications/Emacs.app/Contents/MacOS/bin/":${PATH}
export PATH="/opt/local/libexec/gnubin/":${PATH}
;;
cygwin*)
;;
esac
# convenience functions for swapping between qwerty and dvorak
function aoeu() {
if [ -n "$DISPLAY" ]; then
setxkbmap -layout us;
else
loadkeys /usr/share/keymaps/i386/qwerty/us-latin1.kmap.gz;
fi;
}
function asdf() {
if [ -n "$DISPLAY" ]; then
setxkbmap -layout dvorak;
else
loadkeys /usr/share/keymaps/i386/dvorak/dvorak.kmap.gz;
fi;
}
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# general aliases
alias ec='emacsclient --alternate-editor=""'
alias edit='emacsclient --alternate-editor=""'