Skip to content

v2.31.1

Choose a tag to compare

@github-actions github-actions released this 15 Nov 05:40
· 15 commits to main since this release

Fixes

  • Equals forms of the information options are passed through the shell function. --alias=NAME and --shell-logger=FILE were not matched by the pass-through guard, so the shell function evaluated their output as a corrected command: fuck --alias=myfuck executed the printed alias code and fuck --shell-logger=FILE started the logger inside the evaluation. The bash, zsh, fish and PowerShell guards now match the equals forms as well.

  • Out-of-range settings values are replaced and reported. A zero or negative wait_command killed the re-run command before it printed anything, so every rule that needs the output silently stopped working, and a huge value overflowed the time.Duration conversion and turned the wait into an immediate timeout. wait_command and wait_slow_command are now limited to 1–3600 seconds, a negative history_limit or num_close_matches falls back to the defaults too, and the replaced values are reported by a correction run and by go-fuck --doctor instead of being applied silently.

Performance

  • The shell is detected only by the commands that need it. --help and --list-rules never touch the shell, so they no longer walk the process tree, which is a process snapshot on Windows. Local startup comparisons measured a few milliseconds saved per invocation for those commands and no change for --version, --doctor, --alias, --setup and the correction flow, which detect the shell right before they need it.

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.
  • The PowerShell integration script (Windows PowerShell 5.1) and the bash/zsh part of the shell integration script pass locally, including the new pass-through guard and the instant mode aliases.
  • Distribution manifests are regenerated for 2.31.1 and the AUR package is published as 2.31.1-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.1.

Changelog

Full Changelog: v2.31.0...v2.31.1