fix(tazjin/emacs): always list ttys locally

Change-Id: Ic05378013aa327616a822336881d9a76c8a22d58
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9829
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
This commit is contained in:
Vincent Ambo 2023-10-25 14:25:15 +03:00 committed by clbot
parent a89695c4c5
commit b916c2d0b1

View file

@ -45,7 +45,8 @@
(let ((command "who | awk '{print $2}' | grep -v tty7"))
(-filter (lambda (s) (not (string-empty-p s)))
(s-lines
(s-trim (shell-command-to-string command))))))
(s-trim (let ((default-directory "/"))
(shell-command-to-string command)))))))
(defvar cached-tty-sessions (cons (time-convert nil 'integer) (list-tty-sessions))
"Cached TTY session value to avoid running the command too often.")