18 lines
476 B
Bash
18 lines
476 B
Bash
#!/bin/bash
|
|
# Format history records
|
|
export HISTTIMEFORMAT="[%s] "
|
|
|
|
# Append to history file
|
|
#PROMPT_COMMAND="history -a; $PROMPT_COMMAND"
|
|
|
|
# Share between shells
|
|
#PROMPT_COMMAND="history -c; history -r; $PROMPT_COMMAND"
|
|
|
|
# append to the history file, don't overwrite it
|
|
shopt -s histappend
|
|
# Unlimited history
|
|
export HISTFILESIZE=
|
|
export HISTSIZE=
|
|
# don't put duplicate lines or lines starting with space in the history.
|
|
# See bash(1) for more options
|
|
HISTCONTROL=ignoreboth
|