plugin/history: don't use export
...so the plugin is friendly to variables already marked read-only.
This commit is contained in:
@@ -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}"
|
||||||
|
|||||||
Reference in New Issue
Block a user