Hacker News new | ask | show | jobs
by chaos_a 2307 days ago
Is there a way to make the timestamps permanent? Kinda sucks that they disappear when you close iTerm.
2 comments

Would having them print directly in the shell prompt work? For bash, I combine PS0 support (in bash >=4.4) and PROMPT_COMMAND to do this.

My prompt command: https://github.com/paxswill/dotfiles/blob/c4c6d50123fc2535e2...

And PS0: https://github.com/paxswill/dotfiles/blob/c4c6d50123fc2535e2...

Basically the prompt command writes the current time stamp on the right edge of the window whenever the prompt is printed. Then PS0 overwrites that time stamp right before a command is executed.

If you want the time stamp on the left you can skip the prompt command and tput usage by using the \t escape code in PS1, but PS0 will need to be modified for the new location while still using tput.

Not natively:

https://gitlab.com/gnachman/iterm2/issues/4492

However, you could probably hack together a fix pretty easily with this:

https://github.com/BlueM/cliclick

Make it press cmd-shift-e as a Profile command.