bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Please improve documentation of "history -a"


From: Reuben Thomas
Subject: Please improve documentation of "history -a"
Date: Wed, 10 Jun 2015 00:42:26 +0100

At least in bash 4.3, the documentation for history -a says:

          Append the new history lines (history lines entered since the
          beginning of the current Bash session) to the history file.

This is unfortunately misleading, since it suggests that the technique of adding "history -a" to one's PROMPT_COMMAND, as suggested here:

http://heyrod.com/snippet/s/always-append-bash-history.html

​would append to one's history file many copies of the lines entered since the beginning of the current session. Fortunately it doesn't do that, but rather appends lines that have not yet been appended. I suggest making this clear, and also mentioning the PROMPT_COMMAND trick, as I look forward to losing far fewer useful commands from my global history by having them instantly saved, and not lost when a long-running terminal hangs and must be killed, or the machine running out of power etc.

-
​​
-
http://rrt.sc3d.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]