I'd like to know if I can track commands entered by user in a bash shell, in real time.
What I'm trying to do is something similar to thefuck, but I need to prompt the user as and when he enters new commands into the shell.
Is there any way I could write a hook to bash that kind of lets me wrap my code around it ? Alternatively: is there a way to pull updated bash history? afaik bash writes to history when the shell is exited, unless you run 'history' command in the same terminal.