Technique to share command history across Bash secctions.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Sun, 08 Jul 2012 15:24:33 +0300
changeset 483 f02dbcb71260
parent 482 3860547a5594
child 484 cf2e6576575c
Technique to share command history across Bash secctions.
.bashrc
--- a/.bashrc	Sun Jul 08 15:19:43 2012 +0300
+++ b/.bashrc	Sun Jul 08 15:24:33 2012 +0300
@@ -52,6 +52,13 @@
 shopt -s histreedit
 shopt -s histverify
 
+# Technique to share command history across Bash secctions.
+# Just run:
+#   history -n
+# to reload history.
+# This setting automatically update history file, but ignore HISTCONTROL=erasedups settings.
+# PROMPT_COMMAND='history -a'
+
 # Minor errors in the spelling of a directory component in a cd command will
 # be corrected.
 shopt -s cdspell