Repository navigation
v2.31.1
Fixes
-
Equals forms of the information options are passed through the shell function.
--alias=NAMEand--shell-logger=FILEwere not matched by the pass-through guard, so the shell function evaluated their output as a corrected command:fuck --alias=myfuckexecuted the printed alias code andfuck --shell-logger=FILEstarted 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_commandkilled the re-run command before it printed anything, so every rule that needs the output silently stopped working, and a huge value overflowed thetime.Durationconversion and turned the wait into an immediate timeout.wait_commandandwait_slow_commandare now limited to 1–3600 seconds, a negativehistory_limitornum_close_matchesfalls back to the defaults too, and the replaced values are reported by a correction run and bygo-fuck --doctorinstead of being applied silently.
Performance
- The shell is detected only by the commands that need it.
--helpand--list-rulesnever 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,--setupand the correction flow, which detect the shell right before they need it.
Verification
- Full test suite,
gofmt,go vet,staticcheckand 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
- 100ee08: perf(cli): detect the shell only for commands that need it (@leafevans)
- 950c9f8: fix(alias): pass the equals form of the information options through (@leafevans)
- 808a85f: fix(settings): replace out-of-range wait and history values (@leafevans)
Full Changelog: v2.31.0...v2.31.1