plugin/history: don't use `export`

...so the plugin is friendly to variables already marked read-only.
pull/1940/head
John D Pell 2021-12-27 14:16:58 -08:00 committed by John D Pell
parent 4dbe92e38d
commit 8052911861
1 changed files with 3 additions and 3 deletions

View File

@ -5,11 +5,11 @@ about-plugin 'improve history handling with sane defaults'
# variable when the shell exits, rather than overwriting the file. # variable when the shell exits, rather than overwriting the file.
shopt -s histappend shopt -s histappend
# erase duplicates; alternative option: export HISTCONTROL=ignoredups # erase duplicates; alternative option: HISTCONTROL=ignoredups
export HISTCONTROL=${HISTCONTROL:-ignorespace:erasedups} : "${HISTCONTROL:=ignorespace:erasedups}"
# resize history to 100x the default (500) # resize history to 100x the default (500)
export HISTSIZE=${HISTSIZE:-50000} : "${HISTSIZE:=50000}"
# Flush history to disk after each command. # Flush history to disk after each command.
export PROMPT_COMMAND="history -a;${PROMPT_COMMAND}" export PROMPT_COMMAND="history -a;${PROMPT_COMMAND}"