-
Notifications
You must be signed in to change notification settings - Fork 1
/
bash.bash
39 lines (35 loc) · 978 Bytes
/
bash.bash
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
#*******************
#** Generics options
#*******************
# Options will work on bash only
shopt -s cdspell &> /dev/null
shopt -s autocd &> /dev/null
shopt -s dirspell &> /dev/null
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize &> /dev/null
#*******************
#** Generic variables
#*******************
export EDITOR=vim
# some programs use this instead of EDITOR
export VISUAL=$EDITOR
if [[ $PATH != *"${HOME}/.local/bin"* ]]
then
export PATH="${HOME}/.local/bin:$PATH"
fi
#*******************
#** Bindings
#*******************
# Prefix sudo to the command
[[ $- = *i* ]] && bind '"\C-xs":"\C-asudo \C-e"'
#*******************
#** History
#*******************
HISTFILESIZE=100000
HISTSIZE=100000
HISTIGNORE="&:l[las]:[bf]g:l:a:j:f:b:e"
HISTCONTROL=erasedups:ignorespace
HISTTIMEFORMAT="%d/%m/%Y %T "
[ -z $HISTFILE ] && HISTFILE=$HOME/.bash_history
shopt -s histappend &> /dev/null