You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Kitty's addition of --posix to bash command line for integration injection makes the injection non-transparent and can break user scripts. In particular, --posix causes bash to enable the inherit_errexit shell option. inherit_errexit remains enabled even after kitty.bash resets the posix shell option.
inherit_errexit being unexpectedly enabled can break sourced shell functions in subtle and hard-to-guess ways.
To Reproduce
Steps to reproduce the behavior:
Launch bash in kitty with integration enabled
Run shopt -p inherit_errexit
Observe that inherit_errexit is enabled
Run the same command in xterm and observe that inherit_errexit is disabled
The text was updated successfully, but these errors were encountered:
That's a bug in bash, it should reset the setting when resetting posix.
In any case its trivial to workaround, simply have kitty.bash reset it.
Feel free to send a PR.
Why are you closing this bug? User shell code is still broken. Whether or not bash should reset options set as a side effect of using --posix, it doesn't, and even if we changed bash's behavior today, it'd be years before a version of bash with that change propagated to users.
Describe the bug
Kitty's addition of
--posix
to bash command line for integration injection makes the injection non-transparent and can break user scripts. In particular,--posix
causes bash to enable theinherit_errexit
shell option.inherit_errexit
remains enabled even afterkitty.bash
resets theposix
shell option.inherit_errexit
being unexpectedly enabled can break sourced shell functions in subtle and hard-to-guess ways.To Reproduce
Steps to reproduce the behavior:
shopt -p inherit_errexit
inherit_errexit
is enabledinherit_errexit
is disabledThe text was updated successfully, but these errors were encountered: