I am creating a bash script which I wish to release on github. The script needs to access the command history but this is not possible without sourcing that script.
I don't want users to put it in their
~/.bashrc or source the script every time they run it.
So, is there any way I can create a script which gets sourced by default.
Is there some way to access the history of the current terminal without sourcing the script?