-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bashrc
33 lines (27 loc) · 923 Bytes
/
.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
#!/usr/bin/env bash
### medington's simple .bashrc
# Don't do any of this setup if this not an interactive shell
[[ -z "$PS1" ]] && return
# Source the default bashrc, because apparently we are supposed to...
source_file /etc/bashrc
# Setup prompt
declare -x PS1="\n\d \t \$(myip) \$(gbr)\n[ \[\e[36m\]\u@\h\[\e[0m\] \[\e[01m\]\w\[\e[0m\] ]"
declare -x SUDO_PS1="[ \u@\h:\w ]"
# Essential aliases
alias ll='ls -al'
alias u='cd ..'
alias md='mkdir'
# This HISTSTART makes this block of code idempotent (no dup "shell started" msg)
if [[ -z ${HISTSTART} ]]; then
# Setup uber complete history data
shopt -s histappend
unset HISTFILESIZE
declare -x HISTSIZE=50000
declare -x HISTCONTROL=ignorespace
declare -x HISTTIMEFORMAT="%m-%d %T - "
declare -x HISTSTART=$(date)
declare -x CURUSER=${SUDO_USER:-$USER}
histchars='!^#'
set -o history
history -s "# Shell started: ${HISTSTART} by ${CURUSER}"
fi