Skip to content

v2.0.1 — exec TTY + shell setup fixes

Latest

Choose a tag to compare

@Suchun-sv Suchun-sv released this 08 May 09:38

Patch release — exec TTY fixes

Thanks to @chanztuying (#3) for tracking these down.

Fixed

  • e exec on web/non-stdin terminals. execTTY now opens /dev/tty directly (matching what tcell does internally) instead of relying on os.Stdin. Previously, when KSTool was launched from a web-terminal or any context where stdin was a pipe, e would either freeze or silently fail.
  • Local terminal echo / line buffering during exec. Before invoking ExecJob, the local TTY is now switched to raw mode via term.MakeRaw. Without this, the kernel's line discipline echoed escape sequences (^[[A, bracketed-paste markers like ^[[200~) and held input until you pressed Enter. The remote shell now sees keystrokes as you type them.
  • Remote shell setup. The exec command upgraded from a bare /bin/bash to env TERM=xterm-256color /bin/sh -c 'stty sane; exec /bin/bash -i'. Two effects: readline gets a full terminfo entry (arrow keys, history search, color prompts work), and any -echo left over from a container's .bashrc is reset before the interactive shell starts.

Tooling

  • build.sh now invokes $GOROOT/bin/go instead of the ambient go binary. This avoids a silent build failure when a Go 1.25 wrapper is on PATH but the toolchain it dispatches to is older (1.22.x) and disagrees on flags.

Compatibility

Drop-in replacement for v2.0.0. No config changes. ~/.kstool/config.yaml and saved env-config presets are unchanged.

Install

wget https://github.com/Suchun-sv/KSTool/releases/download/v2.0.1/kstool-linux-amd64
chmod +x kstool-linux-amd64
./kstool-linux-amd64

Verify with SHA256SUMS if you want the integrity check.

Full diff

v2.0.0...v2.0.1