-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
bashrc.symlink
52 lines (38 loc) · 1.06 KB
/
bashrc.symlink
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
# .bashrc
# vim:syntax=sh
# Make vim the default editor
export EDITOR="vim"
# Temporary utility function
function _source_if_exists {
local file ;
for file ; do
[[ -f "${file}" ]] && source "${file}" ;
done
}
#
# Common bash invocations...
#
# (1) interactive login shells
# $- = himBH
#
# (2) non-interactive login shells
# $- = hBc
#
# User-specific vars and paths (needed for both interactive and non-interactive shells
_source_if_exists "${HOME}/.vars" "${HOME}/.path" ;
case $- in *i* )
# Source global definitions
_source_if_exists "/etc/bashrc" ;
# Before anything else
_source_if_exists "${HOME}/.before_dotfiles" ;
# Settings for bash history
_source_if_exists "${HOME}/.history" ;
# Set the PS1 prompt for interactive shells
_source_if_exists "${HOME}/.prompt" ;
# User-specific aliases and functions
_source_if_exists "${HOME}/.aliases" "${HOME}/.functions";
# After everything else
_source_if_exists "${HOME}/.after_dotfiles" ;
esac
# Temporary utility function
unset _source_if_exists ;