fix: make help tab read-only (stty -echo -icanon)

This commit is contained in:
Mortdecai
2026-03-26 19:22:16 -04:00
parent ff33967020
commit 59db3ab59a
2 changed files with 6 additions and 2 deletions
+5 -2
View File
@@ -1,7 +1,10 @@
#!/bin/bash
# sethmux cheat sheet — runs in the persistent help tab
# Read-only: all keyboard input is silently consumed
# Redraws on terminal resize via trap
stty -echo -icanon 2>/dev/null
draw() {
clear
COLS=$(tput cols)
@@ -75,5 +78,5 @@ draw() {
trap draw WINCH
draw
# Stay alive, redraw on resize
while true; do sleep 86400; done
# Read-only: consume all stdin silently, redraw on resize
while IFS= read -r -s -n 1 -t 86400 _ 2>/dev/null; do :; done