-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bashrc_root
58 lines (46 loc) · 1.29 KB
/
.bashrc_root
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
# ~/.bashrc :: user.root
# only proceed for interactive shells
[ -z "$PS1" ] && return
# determine os
OS=$(uname)
# source global definitions
[ -f /etc/bashrc ] && . /etc/bashrc
# ignore duplicates and cmds starting with spaces
HISTCONTROL=ignoreboth
# append to the history file, don't overwrite it
shopt -s histappend
# set history length
HISTSIZE=99999
HISTFILESIZE=$HISTSIZE
# set red root prompt
PS1='\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
# source appropriate alias files
[ -f ~/.bash_aliases ] && . ~/.bash_aliases
# set editor var
export EDITOR=$(which vim)
# add homebrew sbin to path
if [[ "$(uname)" == Darwin ]]; then
export PATH=$PATH:/usr/local/sbin
fi
# user specific aliases and functions
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias ls='ls --color=auto'
alias ll='ls -l'
alias lsh='ll -S'
alias lshr='ll -Sr'
alias ltr='ll -tr'
alias la='ll -a'
alias latr='ll -atr'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
alias vi="$(which vim)"
# mac specific aliases
if [[ "$OS" == Darwin ]]; then
alias ls='ls -G'
alias killhogz="echo 'kill: backblaze, adobe cc helper, notifyd, wacom, synergy'"
alias killnotifyd="killall notifyd"
alias killcertsecurityagent="killall -HUP SecurityAgent"
fi