Skip to content

ateijelo/bash-eternal-history

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Bash Eternal History

Installation

Clone or download somewhere and source bash-eternal-history.sh on your ~/.bashrc. This is a possible way to do it:

$ git clone [email protected]:ateijelo/bash-eternal-history.git
$ cd bash-eternal-history
$ echo "source \"$PWD/bash-eternal-history.sh\"" >> ~/.bashrc

Usage

After installation, you just need to start a new shell and every command will be logged twice to ~/.bash_eternal_history, one time before running the command and a second time after the command is done.

This is useful to investigate how long a command took to complete. If you'd rather have it logged once, check the variables at the beginning of the code.

I also added the following function to my ~/.bashrc, to perform searches:

function bh()
{
    grep -a "$@" ~/.bash_eternal_history
}

About

Bash Eternal History

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages