-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot_profile
More file actions
executable file
·34 lines (28 loc) · 905 Bytes
/
dot_profile
File metadata and controls
executable file
·34 lines (28 loc) · 905 Bytes
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
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
PATH="$HOME/.local/bin:$PATH"
fi
. "$HOME/.commonprofile"
# change into zsh if possible
ZSH="$(command -v zsh)"
if [ "$SHELL" != "$ZSH" ] && [ -x "$ZSH" ]; then
export SHELL="$ZSH"
exec "$ZSH" "$@"
fi
# auto-attach tmux if in an interactive session if not nested
if command -v tmux &> /dev/null && [ -z "$TMUX" ] && [ -z "$DISPLAY" ] && [[ $- == *i* ]]; then
exec tmux new-session -A -s profile_spawn
fi
# if running bash; execute after commonprofile to match zsh behavior
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
# warning
echo "warning: bashrc is no longer updated, use zsh" >&2