-
-
Notifications
You must be signed in to change notification settings - Fork 922
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Homebrew Bash completions do not work in POSIX mode #6926
Comments
I have no idea what Homebrew bash completion is, or how it works, but putting the set -o | grep posix shows that posix mode is indeed turned off before bashrc is sourced, kitty --config NONE -o shell=bash |
And just to note this is with brew install bash-completion@2 which is enabled via cat ~/.bash_profile
[[ -r "/opt/homebrew/etc/profile.d/bash_completion.sh" ]] && . "/opt/homebrew/etc/profile.d/bash_completion.sh" |
When I put
When I leave that configuration in place, but run iTerm instead of kitty, it shows off. |
Bash completion is not the issue, it's just one thing that doesn't run correctly when the posix option is enabled. |
As I said, I cannot reproduce. set -o | grep posix gives me posix off |
I found echo "Running bash integration" I tried explicitly turning it on with:
When I open kitty, I see that the program sets the ENV variable to run the integration script, but according to the bash man page, the ENV variable is only used when
Is bash being invoked as sh? |
If shell integration is not enabled, then bash would be executed |
And if you want to debug further run kitty from source and modify the |
MacOS Sonoma ships with bash version 3.2.57(1)-release. Given that the bash shell integration script requires version 4, it won't work without a newer version of bash installed. Users can install a newer version of bash with homebrew with NOTE: The Bash man page indicates that [1] https://opensource.apple.com/source/bash/bash-92/bash-3.2/doc/bash.1.auto.html and search for: "command line option, it follows the POSIX standard for startup files"
#!/bin/bash
echo "Running" |
This may be useful for verification: |
The default shell on macOS is zsh not bash. If you are anyway using a |
Good point! I forgot that zsh is the default. I use bash a work, so I want to use the same config on my Mac. I agree that an up-to-date version should be used. Unfortunately, it's not recommended to upgrade /bin/bash as other software may depend on features or bugs in the system. That's why brew installs updated versions of bash, make, find, etc to I think it's reasonable to ignore this edge case. I hope that anyone else who has this problem will find this issue. It is fascinating that bugs like this live on for 1 or 2 decades in the interest of having "stable" software. |
I installed kitty (0.31.0) on MacOS (Sonoma) to try it out. I get "Homebrew Bash completions do not work in POSIX mode".
When the shell does open
set | grep POS
results in:If I put
set +o posix
as the first line in my .bashrc, there are no errors. If I use iTerm, I get no errors.I know that the documentation indicates that POSIX is disabled before initialization scripts run, but this does not seem to be the case.
Steps to reproduce the behavior:
Environment details
Additional context
Running
open -n /Applications/kitty.app --args --config NONE
does change my font size back (which is the only thing I changed), but has no effect on this problem, or my workaround.The text was updated successfully, but these errors were encountered: