0

I need real-time clock in prompt so I enable trap with zle reset-prompt, this causing tmux-logging continue to capture like enter with TMOUT=1 - each 1s causing like new line, I have bunch of these lines in log file:

[user@localhost ~]
[user@localhost ~]
[user@localhost ~]
[user@localhost ~]

How could I avoid this? make tmux-logging ignore the trap/reset-prompt?

Tuyen Pham
  • 1,765
  • 1
  • 16
  • 46
  • Why not have tmux display a clock in its status bar (or the terminal emulator window title assuming it has that capability as well like GNU screen). – Stéphane Chazelas Aug 30 '18 at 06:44
  • As sysops, I need to check UTC time constantly against time in logfiles. – Tuyen Pham Aug 30 '18 at 06:56
  • Then having the clock in tmux title makes very much sense which means you see the time even when you're not at the shell prompt. I do have the clock in my GNU screen title. – Stéphane Chazelas Aug 30 '18 at 06:58
  • That'll require you to look at the bottom of the screen, when I don't work with ssh to a server, I don't need a clock, info like cpu, ram... etc status cause distraction a lot. I'd still prefer a solution or workaround this issue. – Tuyen Pham Aug 30 '18 at 07:14
  • Then you'd need zsh to tell tmux to stop logging before it redraws the prompt and resume after. I can't help you there, as I use GNU screen instead. You'll probably find the answer in the tmux manual. – Stéphane Chazelas Aug 30 '18 at 07:19
  • `Tmux-logging` is the name of a tmux's plugin, so if that probably I have to hack into sourcecode of that plugin? Or maybe some tweaks should work. I'd take any chances. – Tuyen Pham Aug 30 '18 at 07:29
  • Again, can't help you. Other option could be to have the _prompt redrawing routing_ output some invisible characters before and after the prompt redraw to help you remove those from the log file afterwards. – Stéphane Chazelas Aug 30 '18 at 08:36

0 Answers0