Skip to content

v0.2.3

Choose a tag to compare

@saparjohnick saparjohnick released this 04 Sep 13:41
· 16 commits to main since this release

/run no longer types blindly into a busy tab

If a plain tab isn't actually at a shell prompt — stuck in less, vim, a REPL, man, anything that reads keystrokes as its own input instead of a line to submit — /run now asks for confirmation instead of sending straight in. The letters were never running as a command in that case; they were just being fed to whatever's already there (pager navigation, editor insert mode, and so on), silently.

Detection has two layers:

  • A known list of interactive programs (less, more, vim, nano, irb, psql, and a handful of others), checked against the tab's actual foreground process.
  • A fallback for anything not on that list: a bare : as the entire last line of the screen — the one convention practically every pager in the less/more lineage agrees on for "waiting on you." No real shell prompt looks like that, so it's a safe backstop for a custom $PAGER or anything else unrecognized by name.

This only applies to plain (non-agent) tabs — an agent session already gets its own separate handling, and remote (ssh/mosh) commands already had their own confirmation step.