mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-21 18:55:06 +08:00

Commit 5d135d555 (prompts: fix pipestatus for jobs prefixed with "not") introduced a backwards compatibility hack about adding an optional argument to __fish_print_pipestatus. This hack would break downgrading to fish 3.1.2 if the user copied the new prompt to their config - they would get a backtrace on every prompt which is arguably worse than the patch's minor improvement. This does away with the error trace - old fish just won't show the fancy new pipestatus on `not true`. Implemented by passing the last $status as the poor man's kwarg, which works since 3.1.0 (9b86d5dd1 Export all local exported variables in a new scope). The prompts don't work with fish 3.0.0 or older; downgrading does not seem too important in general but I think this patch is an okay simplification.