Skip to content

v2.31.3

Choose a tag to compare

@github-actions github-actions released this 15 Nov 06:53
· 7 commits to main since this release

Fixes

  • fish and tcsh command lines are quoted with their own rules. Both shells used the POSIX quoting of the generic shell, which broke values that are legal in them:

    • fish treats a backslash before a single quote as an escape, so the POSIX '"'"' trick left the closing quote escaped and a\'b was a syntax error. fish now doubles backslashes and escapes single quotes inside one single quoted string.
    • csh performs history substitution even inside single quotes, and a plain newline ends the quoted string: a!b failed with "Event not found" and a multi line value was an unmatched quote. Exclamation marks, newlines and single quotes are now escaped individually.
  • Round-trip tests cover every shell. The new tests run bash, zsh, fish and tcsh when they are installed and compare the argument the shell passes with the original bytes; the shell integration CI job now runs them for all four shells. This is how the fish and tcsh defects were found.

  • The output tests tolerate a loaded machine: the suite runs packages in parallel and a healthy echo is no longer reported as a timeout.

Verification

  • Full test suite, gofmt, go vet, staticcheck and the rule list check pass.
  • CI is green on Linux, macOS and Windows with lint and the 94% coverage gate, including the new quote round-trip step against real bash, zsh, fish and tcsh.
  • Local round-trip runs with the extracted shell binaries: 40/40 quoted words (10 values x 4 shells) reach the shell unchanged.
  • Distribution manifests are regenerated for 2.31.3 and the AUR package is published as 2.31.3-1.

Upgrade

Homebrew, Scoop and AUR update through their package managers; go install github.com/leafevans/go-fuck/v2/cmd/go-fuck@latest picks up 2.31.3.

Changelog

Full Changelog: v2.31.2...v2.31.3