Skip to content

Latest commit

 

History

History
22 lines (19 loc) · 975 Bytes

bash-notes.md

File metadata and controls

22 lines (19 loc) · 975 Bytes

bash

Getting the most out of the venerable default shell

  • The following will create an eternal history for bash as well as preserving history from multiple terminal tabs and is drawn from the following Stack Overflow questions:

    export HISTFILESIZE=
    export HISTSIZE=
    export HISTTIMEFORMAT="[%F %T] "
    export HISTFILE=~/.bash_eternal_history
    PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"
  • I have often found that when I searched backwards in history but hit the wrong key (something I do frequently) I had to hold down the down arrow for a long time to start over looking for that command again. I looked into this and it's not actually not necessary. M-> will take the user to the very end of history without any tedium.