mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-21 03:53:53 +08:00

This makes `fish -c begin` fail with a status of 127 - it already printed a syntax error so that was weird. (127 was the status for syntax errors when piping to fish, so we stay consistent with that) We allow multiple `-c` commands, and this will return the regular status if the last `-c` succeeded. This is fundamentally an extremely weird situation but this is the simple targeted fix - we did nothing, unsuccessfully, so we should fail. Things to consider in future: 1. Return something better than 127 - that's the status for "unknown command"! 2. Fail after a `-c` failed, potentially even checking all of them before executing the first? Fixes #9888