-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot_bashrc_common.tmpl
More file actions
55 lines (45 loc) · 1.29 KB
/
dot_bashrc_common.tmpl
File metadata and controls
55 lines (45 loc) · 1.29 KB
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
# Common system independent things for .bashrc
# Source this in the actual .bashrc
# Set environment variables
source ~/.env
if [ -f ~/.env_local ]; then
source ~/.env_local
fi
# Bash pre-exec
source ~/.bash-preexec/bash-preexec.sh
# Aliases
source ~/.aliases
# fzf
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
# Powerline
source ~/.powerline_location
if [[ $(hostname) == *"{{ .powerlinehostname }}"* ]]; then
if [ -f `which powerline-daemon` ]; then
powerline-daemon -q
POWERLINE_BASH_CONTINUATION=1
POWERLINE_BASH_SELECT=1
PROMPT_COMMAND_READ_ONLY=$(readonly -p | egrep "declare -[[:lower:]]+ PROMPT_COMMAND=" 1> /dev/null; echo $?)
if [[ $PROMPT_COMMAND_READ_ONLY -eq 0 ]]; then
source $POWERLINE_BASH_BINDINGS_PATH/powerline-user.sh
else
source $POWERLINE_BASH_BINDINGS_PATH/powerline.sh
fi
fi
fi
# Tmux aliases
source ~/.tmux_aliases
{{ if .hasslurm }}
# SLURM restart functions
source ~/.slurm_restart_functions
# SLURM aliases
source ~/.slurm_aliases
{{ end }}
# Make ls colors nice
eval `dircolors ~/.dircolors`
# Chezmoi completions
if [ -f ~/.chezmoi_bash_completions ]; then
source ~/.chezmoi_bash_completions
fi
# Bash shell options
shopt | grep -q '^direxpand\b' && shopt -s direxpand
# vim: set syntax=sh: