|
|
|
|
|
by hello_computer
445 days ago
|
|
I usually only care about commands from the same session, but sometimes I need to delve into the global history. With the default bash setup on most distros, the history log isn't updated until the shell terminates--leaving the "global" history incomplete until the other shells terminate. That is, I can lookup history from "dead" shells, but not from "living" ones. I think shell history would be more practical if it appended to the history log after each command (rather than at the end of the session), and tagged each line with some form of "session ID"--allowing us to distinguish between "local" and "global" history. You can force a flush to the log "as-is" with things like prompt overrides, but that's an all-or-nothing solution, saddling us with history from foreign shells even when we don't want it. Adding a session ID to the history log, and another flag to the built-in "history" command (to toggle between local and global history), would be a worthwhile improvement. |
|