forked from hjuutilainen/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.bash_profile
54 lines (40 loc) · 1.06 KB
/
.bash_profile
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
#
# History settings
#
# Number of lines in the history file
export HISTFILESIZE=1000000
# Number of entries in the history file
export HISTSIZE=1000000
# History file location
export HISTFILE=~/.bash_history
# Display timestamps as "yyyy-mm-dd HH:MM:SS"
export HISTTIMEFORMAT="%F %T "
# Ignore duplicates
export HISTCONTROL=ignoreboth:erasedups
# We might want to ignore something
# HISTIGNORE="&:pwd:ls:[bf]g:exit:[ \t]*"
#
# Bash settings
#
# Attempt to save all lines of a multiple-line command in the same history entry
shopt -s cmdhist
# Appended instead of overwriting the history file
shopt -s histappend
# Case-insensitive filename expansion
shopt -s nocaseglob
# Make sure every simultaneous session has the same history
export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"
#
# Some history helpers
#
function hs {
grep $1 $HISTFILE
}
alias h1='history 10'
alias h2='history 20'
alias h3='history 30'
# Add ~/bin to $PATH
export PATH="$HOME/bin:$PATH"
# Prefer US English and use UTF-8
export LC_ALL="en_US.UTF-8"
export LANG="en_US"