forked from thomasf/dotfiles-thomasf-base
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.profile
35 lines (28 loc) · 913 Bytes
/
.profile
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
#!/bin/sh
#
# Profie
# Man page: profile
# Useful reference: https://help.ubuntu.com/community/EnvironmentVariables
#set -x
# Prepend path
ppath() {
[ -d "${1}" ] && PATH="${1}:${PATH}" && export PATH
}
ppath "/var/lib/gems/1.8/bin"
ppath "/var/lib/gems/1.9/bin"
ppath "${HOME}/.cabal/bin"
# Add all ~/.bin and all ~/.bin-* directories to path
for D in $(find $HOME -maxdepth 1 -name ".bin-*" -o -name ".bin" | sort); do
ppath ${D}
done
# ------------------------------------------------------------------------------
# PRIVATE AND LOCAL
#
[ -e "${HOME}/.profile-private" ] && . "${HOME}/.profile-private"
[ -e "${HOME}/.profile-local" ] && . "${HOME}/.profile-local"
unset -f ppath
# Application configuration
EDITOR="editor" && export EDITOR
VISUAL="${EDITOR}" && export VISUAL
ALTERNATE_EDITOR="${EDITOR}" && export ALTERNATE_EDITOR
[ $(which less) ] && PAGER="$(which less)" && export PAGER