aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Triguba <hello@eugenetriguba.com>2025-08-16 16:50:20 -0400
committerEugene Triguba <hello@eugenetriguba.com>2025-08-16 16:50:20 -0400
commitd14b6cc685d49bd06cecfce0c18aa7f452c8fa06 (patch)
tree50285344e0d61042d8c87df7232402675272d282
parentAdjust comment (diff)
downloadtmux-toggle-term-d14b6cc685d49bd06cecfce0c18aa7f452c8fa06.zip
Adjust script comments
-rwxr-xr-xtoggle-term.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/toggle-term.sh b/toggle-term.sh
index ba6dc89..cd2e5c1 100755
--- a/toggle-term.sh
+++ b/toggle-term.sh
@@ -1,12 +1,12 @@
#!/bin/sh
-# Modes:
-# split → per-window split pane
-# float → global floating window
-
TMUX_CMD="tmux"
POPUP_SESSION_NAME="popup"
main() {
+ # The script supports targeting a different tmux socket
+ # or configuration file solely for testing purposes. This
+ # allows isolation between the tmux installation on the host
+ # and the tmux session for the test run.
if [ -n "${TMUX_SOCKET:-}" ]; then
if [ -n "${TMUX_CONFIG_PATH:-}" ]; then
TMUX_CMD="tmux -f $TMUX_CONFIG_PATH -L $TMUX_SOCKET"
@@ -15,6 +15,9 @@ main() {
fi
fi
+ # Modes:
+ # float → global floating window
+ # split → per-window split pane
mode="$1"
case "${mode}" in
float)