-
Notifications
You must be signed in to change notification settings - Fork 2
/
.bash_profile
43 lines (36 loc) · 874 Bytes
/
.bash_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
shopt -s nocasematch
if [[ $OS == *Windows* ]]
then
export IS_WINDOWS="TRUE"
fi
shopt -u nocasematch
if [ -f $HOME/.bashrc ]; then
source $HOME/.bashrc
fi
if [ "$(uname)" == "Darwin" ]; then
if command v brew &> /dev/null; then
if [ -f `brew --prefix`/etc/bash_completion ]; then
source `brew --prefix`/etc/bash_completion
fi
fi
fi
# Don't do any of the rest on Windows
# SSH Stuff
function checkssh() {
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
SESSION_TYPE=remote/ssh
else
case $(ps -o comm= -p $PPID) in sshd|*/sshd) SESSION_TYPE=remote/ssh;;
esac
fi
if [ "$HOSTNAME" = "mgraczyk-desktop" ]
then
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx
fi
}
if [[ ! $OS == *Windows* ]]
then
checkssh
fi
export BASH_SILENCE_DEPRECATION_WARNING=1
#CHEF.NO.SOURCE