3

I want to store additional info about the commands I execute in the shell history, namely the host, user, pwd, the timestampand the command itself.

I have recenlty asked some questions about it, eg Is there some utility or plugin which includes the current directory in the bash history? and https://www.reddit.com/r/zsh/comments/67wdl8/does_zsh_have_the_facility_to_record_more_than/.

Do any of the other shells ie besides bash, namely zsh and fish, have history formats that can include the additional information? The unix.stackexchange question has a an example that will probably break if histories from different sessions are added, and the author says it will be a bit involved if additional information is added to the timestamp line.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.