Skip to content

detailed bash log with preexec and precmd #148

@alperyilmaz

Description

@alperyilmaz

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions