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.
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 useprecmdto 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 toprecmdas input? In that caseprecmd()has everything (i.e. command, folder, duration, exit code) to save to a log file.