summaryrefslogtreecommitdiffstats
path: root/minimal/.bashrc
blob: 761e585606e8f76b4788b6797a755275b7f246c6 (plain)
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
#
# ~/.bashrc
#

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

# Bash config
#export EDITOR=nvim
#HISTCONTROL=ignoreboth
#shopt -s histappend
#HISTSIZE=1000
#HISTFILESIZE=2000
#shopt -s checkwinsize

# Alias definitions.
if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

# Disable CTRL+S and CTRL+Q keybindings
# (used to pause and resume output to terminal)
# See: https://unix.stackexchange.com/a/137846/347754
#      https://unix.stackexchange.com/a/73499/347754
stty -ixon

# Prompt
# - user@host pwd (git prompt)
# Ref.: https://stackoverflow.com/a/15398153/7498073
source ~/.git-prompt.sh
#PS1='[\u@\h \W]\$ '
PS1='\[\033[32m\]\u@\h \[\033[35m\]$MSYSTEM \[\033[33m\]\w\[\033[36m\]`__git_ps1`\[\033[0m\]\n$ '

# less
LESS="-i"                       # ignore case
LESS+=" -S"                     # don't chop long lines
LESS+=" -j5"                    # Add 5 context lines
LESS+=" --RAW-CONTROL-CHARS"
export LESS

# better `ls` (and other programs like `tree`) colors
#eval "$(dircolors)"