mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-25 21:11:32 +00:00
21 lines
312 B
Bash
21 lines
312 B
Bash
_postcmd()
|
|
{
|
|
AT_PROMPT=1
|
|
history -a
|
|
}
|
|
PROMPT_COMMAND="_postcmd"
|
|
|
|
_precmd()
|
|
{
|
|
[ -z "$AT_PROMPT" ] && return
|
|
unset AT_PROMPT
|
|
[ -z "$TFW_DELAY_HISTAPPEND" ] && history -a
|
|
}
|
|
trap _precmd DEBUG
|
|
|
|
shopt -s cmdhist
|
|
shopt -s histappend
|
|
unset HISTCONTROL
|
|
export HISTFILESIZE=1000
|
|
export HISTSIZE=1000
|