Skip to content

Releases: fermat-tech/posh

posh v1.3.59

Choose a tag to compare

@fermat-tech fermat-tech released this 17 Jul 00:07

Test-suite maintenance release. No changes to the shell itself — these binaries behave identically to v1.3.59's predecessor, v1.3.58.

Fixed

  • Fixed the internal/eval test helpers silently losing output when a pipeline stage ran an external command.

    The helpers gave the same bytes.Buffer to both Shell.Stdout and Shell.Stderr. Go's exec drains an external child's stderr with io.Copy, which prefers an io.ReaderFrom; bytes.Buffer.ReadFrom records the buffer length on entry, blocks until the child's stderr reaches EOF, then truncates back to that length plus the bytes it read. A child writing no stderr reads zero, so the final re-slice discarded whatever a concurrent stage had appended.

    This made TestReadHeredocPipeline fail against correct shell behaviour: cat << EOF | while read line; do echo "$line"; done returned an empty string under go test, while posh itself has always run it correctly. The shell binary passes real *os.File streams, which exec inherits directly and never copies, so no released build was ever affected.

v1.3.58

Choose a tag to compare

@fermat-tech fermat-tech released this 15 Jul 09:24
  • Add bash-style built-in variables: $_, $-, $!, $OLDPWD (+ cd -), $USER, $HOSTNAME, $SHELL, $RANDOM, $SECONDS, and $POSHPID (posh's name for bash's $BASHPID). $PWD is now seeded at startup, not just after the first cd.
  • Fix TAB completion never offering $RANDOM, $SECONDS, or $POSHPID, since those are computed on the fly rather than stored.

v1.3.57

Choose a tag to compare

@fermat-tech fermat-tech released this 15 Jul 07:31
  • Fix a stale Ctrl+C interrupt silently dropping a later statement in a ;-separated command with no error shown (e.g. cd ..;p would cd but never print output). Pressing Ctrl+C to abort or retype a command at the prompt set a process-wide flag that lingered until the next unrelated command consumed it. The flag is now cleared before each new top-level command starts.

v1.3.56

Choose a tag to compare

@fermat-tech fermat-tech released this 12 Jul 09:55
  • Fix kill %n on a backgrounded compound command (e.g. (while true; do ...; done) &) waiting for whatever it was currently running to finish naturally before actually stopping the job. It now kills the currently-running process immediately, matching bash.

v1.3.55

Choose a tag to compare

@fermat-tech fermat-tech released this 12 Jul 09:42
  • Fix a race where a backgrounded plain command (e.g. sleep 3 &) could be missing from jobs -l if checked immediately on the next line, since job registration happened asynchronously with no synchronization at all.
  • A second separator immediately after the first (e.g. cmd &;, cmd ;; outside a case body) is now a syntax error, matching bash, instead of silently truncating the input and dropping everything after the stray separator with no error.

v1.3.54

Choose a tag to compare

@fermat-tech fermat-tech released this 12 Jul 09:20
  • Fix double-quoted alias values (and other mixed-quoted words) truncating at the first internal whitespace, e.g. alias gsd="git status" silently became gsd=git. A mid-word double-quoted segment now protects its internal whitespace from word-splitting the same way a mid-word single-quoted segment already did.

v1.3.53

Choose a tag to compare

@fermat-tech fermat-tech released this 12 Jul 09:11
  • Ctrl+C now cancels a running loop (e.g. while true; do echo 1; sleep 5; done), not just the one external command currently running inside it.
  • Backgrounding a compound command (a subshell, loop, or group -- e.g. (while true; do ...; done) &) is now tracked as a job: jobs -l, kill %n, and wait all work on it, where before it ran as an untracked, unstoppable goroutine.

v1.3.52

Choose a tag to compare

@fermat-tech fermat-tech released this 11 Jul 09:41
  • Fix \ TAB completion to include array variables, matching bash. Previously only scalar variables were considered, so a prefix matching both a scalar and an array variable (e.g. \ matching \ and ) resolved as a single match instead of listing both alternatives on a second TAB, the way bash lists \ and \ for .

v1.3.51

Choose a tag to compare

@fermat-tech fermat-tech released this 11 Jul 09:30
  • Add \ and \, mirroring bash's \ / \. POSH_VERSINFO is a real array (major minor patch machtype); a bare \ (no index) gives the major version, same as bash.

v1.3.50

Choose a tag to compare

@fermat-tech fermat-tech released this 11 Jul 09:11
  • Add --version, matching bash's layout (program identity, copyright, license, warranty disclaimer). Reports the actual release tag.
  • The program name shown in help, --version, and error messages now consistently follows the invoked binary's name (rename-friendly identity) -- help's title previously hardcoded 'posh'.