bash-preexec icon indicating copy to clipboard operation
bash-preexec copied to clipboard

detailed bash log with preexec and precmd

Open alperyilmaz opened this issue 10 months ago • 2 comments

Hi, as I mentioned in previous issue #147 I'm recording bash history in a custom way. As of now, I'm trying to save the command (and current directory) to a file using preexec. Can I use precmd to keep duration and exit code of the command and then also save them?

Actually, is it possible for preexec() to keep the command as variable and then pass it to precmd as input? In that case precmd() has everything (i.e. command, folder, duration, exit code) to save to a log file.

alperyilmaz avatar Oct 06 '23 09:10 alperyilmaz