Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fish] exit as well when called from non-interactive shell
Just like with the other shells, exit fish to, if called from a non-interactive shell. We use an `if`-block and don’t just return immediately for now, as older versions of fish (namely < 3.4.0) did not support to use `return` in `.`-scripts (this was only added with fish commit 3359e5d2e9bcbf19d1652636c8e448a6889302ae). Just using `exit` instead of a `return` wouldn’t be a proper solution either, as it would exit the whole shell, when `shell/key-bindings.fish` was executed or sourced from a non-interactive shell. While this should of course never happen, the idea of the whole check is to handle the situation gracefully, which `exit` can thus not do. Signed-off-by: Christoph Anton Mitterer <[email protected]>
- Loading branch information