Skip to content
Myr

[fish] exit as well when called from non-interactive shell (#3467)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Just like with the other shells, exit fish to, if called from a non-interactive shell. We cannot use `return`, 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). Unlike in POSIX, fish’s `exit` is however documented to no cause the calling shell to exit when executed in a sourced script (see: https://github.com/fish-shell/fish-shell/blob/0f70b2c0d310d97b5956b5360ad6cbc548baf72d/doc_src/cmds/exit.rst?plain=1#L20 )

authored by Christoph Anton Mitterer · committed by GitHub · parent f212baf · Browse files · 1 file+3 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
  • Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>

Diff stats

1 file+3 added−0 removed

  • other:+3 added−0 removed

1 file+3 added−0 removed

modified:shell/key-bindings.fish+3 added
9 unmodified lines
10# - $FZF_CTRL_R_OPTS11# - $FZF_ALT_C_COMMAND12# - $FZF_ALT_C_OPTS1314status is-interactive; or exit 0151617# Key bindings18# ------------19function fzf_key_bindings20
155 unmodified lines