Better Bash History (2012)
By default, the Bash shell keeps the history of your most recent session in the file, and the commands you’ve issued in your current session are also available with a call. These defaults are useful for keeping track of what you’ve been up to in the shell on any given machine, but with disks much larger and faster than they were when Bash was designed, a little tweaking in your file can record history more permanently, consistently, and usefully. To make your file a little easier to parse, you can force commands that you entered on more than one line to be adjusted to fit on only one with the option:
By default, Bash only records a session to the file on disk when the session terminates.
Source: sanctum.geek.nz