-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbash_profile
88 lines (69 loc) · 2.41 KB
/
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#!/bin/bash
# To the extent possible under law, the author(s) have dedicated all
# copyright and related and neighboring rights to this software to the
# public domain worldwide. This software is distributed without any warranty.
# You should have received a copy of the CC0 Public Domain Dedication along
# with this software.
# If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
# base-files version 4.0-9
# ~/.bash_profile: executed by bash(1) for login shells.
# The latest version as installed by the Cygwin Setup program can
# always be found at /etc/defaults/etc/skel/.bash_profile
# Modifying /etc/skel/.bash_profile directly will prevent
# setup from updating it.
# The copy in your home directory (~/.bash_profile) is yours, please
# feel free to customise it to create a shell
# environment to your liking. If you feel a change
# would be benifitial to all, please feel free to send
# a patch to the cygwin mailing list.
# User dependent .bash_profile file
# Set user-defined locale
# export LANG=$(locale -uU)
# Set this and only source file once
if [ -z $"TMUX" ]; then
[[ -z "${BASH_PROFILE}" ]] && readonly BASH_PROFILE=true || return 0
fi
# {{{ Logging
declare -x -i VERBOSE=0
if [[ -f "$HOME/.verbose" ]]; then
VERBOSE=1
fi
_log() {
if [ "$VERBOSE" -eq 1 ]; then
dt="$(date)"
printf "%s-%s: %s\n" "${dt}" "BASH_PROFILE[$$]" "$*"
fi
}
_log "bash_profile"
# }}}
# {{{ Includes
# Enable some Bash 4 features when possible:
# * `autocd`, e.g. `**/qux` will enter `./foo/bar/baz/qux`
# * Recursive globbing, e.g. `echo **/*.txt`
for option in autocd globstar; do
shopt -s "$option" 2>/dev/null
done
# shellcheck source=/dev/null
[ -f /etc/profile ] && source /etc/profile
# shellcheck source=/dev/null
[ -f /usr/local/etc/profile.d/autojump.sh ] && source /usr/local/etc/profile.d/autojump.sh
# Override /etc/profile
# shellcheck source=/dev/null
unset BASH_RC
unset SET_ALIASES
[[ "$-" == *i* ]] && [[ -f "$HOME/.bashrc" ]] && source "$HOME/.bashrc"
export BASH_PROFILE
# Handled Elsewhere:
# Set PATH so it includes user's private bin if it exists
# if [ -d "${HOME}/bin" ] ; then
# PATH="${HOME}/bin:${PATH}"
# fi
# Set MANPATH so it includes users' private man if it exists
# if [ -d "${HOME}/man" ]; then
# MANPATH="${HOME}/man:${MANPATH}"
# fi
# Set INFOPATH so it includes users' private info if it exists
# if [ -d "${HOME}/info" ]; then
# INFOPATH="${HOME}/info:${INFOPATH}"
# fi
# }}}