-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbashrc
70 lines (58 loc) · 1.44 KB
/
bashrc
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
#!/bin/bash
# Load includes
. "${SHELL_PROFILE_PATH}/script_functions" bashrc
if hasFlag "${SHELL_PROFILE_FLAG_BASHRC_DONE}"; then
msgDebug "Skipping bashrc, already run.\n"
return
fi
setFlag "${SHELL_PROFILE_FLAG_BASHRC_DONE}"
msgDebug "==> Running bashrc script\n"
if ! hasFlag "${SHELL_PROFILE_FLAG_PROFILE_DONE}"; then
msgDebug "Starting profile script...\n"
. "$HOME/.profile"
fi
#
# Setup history
#
msgDebug "Configuring history\n"
export HISTSIZE=1000000
export HISTFILESIZE=1000000
export HISTTIMEFORMAT="%F %T "
export HISTCONTROL=ignoreboth
export HISTIGNORE='ls:bg:fg:history'
shopt -s histappend
export PROMPT_COMMAND="history -a; history -c; history -r; settitle; ${PROMPT_COMMAND}"
#
# Set prompt
#
typeset +x PS1='[\t][\u@\h]\w\$ '
#
# Set ls aliases
#
alias ls='ls $LS_OPTIONS -F'
alias ll='ls $LS_OPTIONS -lF'
#
# Set aliases for root
#
if [[ $EUID -eq 0 ]]; then
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
fi
#
# Set OS specific aliases
#
if [ "${SHELL_PROFILE_PLATFORM}" = "darwin" ]; then
alias bplist='plutil -convert xml1 -o /dev/stdout'
alias flushdns='sudo killall -HUP mDNSResponder'
alias kickstart='/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart'
fi
#
# Include local settings
#
if [ -f "${HOME}/.shell/bashrc.local" ]; then
. "${HOME}/.shell/bashrc.local"
fi
msgDebug "==> Done in bashrc script\n"
cleanUp bashrc
# vim: syntax=sh:ts=4:sw=4