~hokiegeek/dotfiles

ref: bb95ccbbd653fccb856a24b2e0ac62fb1a9e6c86 dotfiles/bashrc -rw-r--r-- 1.8 KiB
bb95ccbbHokieGeek This thing.... 2 years ago
                                                                                
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
### DEFAULT STUFF
# If not running interactively, don't do anything
[[ -z "$PS1" ]] && return
[[ $- != *i* ]] && return
[ -z "$SSH_CLIENT" -a -z "$TMUX" ] && exec tmux

# make less more friendly for non-text input files, see lesspipe(1)
# [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# ?? [ -x /usr/bin/lesspipe.sh ] && eval "$(SHELL=/bin/sh lesspipe.sh)"

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
    debian_chroot=$(cat /etc/debian_chroot)
fi

# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
    xterm-color) color_prompt=yes;;
esac

# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
    PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
    ;;
*)
    ;;
esac

# Add an "alert" alias for long running commands.  Use like so: sleep 10; alert
# alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'

[ -f ~/.aliases ] && . ~/.aliases

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
    . /etc/bash_completion
fi

### MY STUFF
set -o vi
ulimit -c unlimited

HISTFILESIZE=20000
HISTSIZE=10000
HISTCONTROL=ignoredups
HISTIGNORE="ls"

shopt -s checkwinsize
shopt -s histappend
# Combine multiline commands into one in history
shopt -s cmdhist

export GOPATH=${HOME}/go
export PATH=${PATH}:${HOME}/.bin
export PATH=${PATH}:/sbin:/usr/sbin:/usr/local/sbin
export PATH=${PATH}:${GOPATH}/bin:~/.bin
export EDITOR="nvim"

. $HOME/.shell-plugins/prompt.sh
[ -f $HOME/.bashrc_alt ] && . $HOME/.bashrc_alt