-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.profile
51 lines (40 loc) · 1.54 KB
/
.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# written using bash syntax
# shared configuration for either bash or zsh
function is_osx {
[[ "$(uname -s)" == "Darwin" ]]
}
is_osx || {
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket";
# changes font size used for urxvt in current terminal
function change_font_size() {
echo -e "\033]710;-xos4-terminus-medium-*-*-*-$1-*-*-*-*-*-iso10646-1\033\\"
}
alias ls='ls --color=auto';
alias clip='xclip -o | xclip -selection c';
alias clap='xclip -selection c -o';
}
alias emc='emacsclient -t'
is_osx && {
export PATH="$HOME/bin:/usr/local/bin:/usr/local/sbin:$PATH"
# This function is for titling terminal tabs in iterm; not sure how widely
# applicable it is.
# nabbed from answers to https://superuser.com/questions/419775/with-bash-iterm2-how-to-name-tabs
function title {
echo -ne "\033]0;"$*"\007"
}
}
is_osx || {
export PATH="$HOME/bin:$PATH"
ssh-add -l > /dev/null || alias ssh='ssh-add -l > /dev/null || ssh-add && unalias ssh; ssh';
}
export PYENV_ROOT="$HOME/.pyenv"
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
[[ -d $HOME/go ]] && export GOPATH="$HOME/go" && export PATH="$GOPATH/bin:$PATH"
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
if [[ -x "$(command -v phpenv)" ]]; then
export PATH="$HOME/.phpenv/bin:$PATH"
eval "$(phpenv init -)"
fi
[ -s "$HOME/.cargo/env" ] && \. "$HOME/.cargo/env"