-
Notifications
You must be signed in to change notification settings - Fork 491
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
bash shell integration resets HISTCONTROL #2269
Comments
Hmm: ghostty/src/shell-integration/bash/bash-preexec.sh Lines 91 to 100 in 3aad8ec
|
cc @jparise |
@tristan957 do you think your issue is the same as what's described in rcaloras/bash-preexec#115? |
Yep. Sounds like it |
I personally feel like this is a security issue. I use a leading space all the time to keep commands out of my history. I wish I knew how to solve my own bash issues like I can with libadwaita 😆 |
I haven't had time to look at this in detail beyond some initial research, but we might consider just applying one of the proposed upstream patches, like: rcaloras/bash-preexec#119 |
No sense in rushing. Just thought I would bring up an affected use case. I now see that PR is 3 years old. Whoops. |
I went ahead and checked the VSCode integrated terminal since it has bash shell integration, I think, and HISTCONTROL is not being changed. Makes me wonder what the ghostty bash shell integration is doing that requires this change over VSCode and VTE. |
Kitty (which doesn't use bash-preexec) just prints a warning when |
Nice find @jparise. I'm fine with this approach in our shell integration as well. |
What do you actually lose out on with HISTCONTROL set to that? It isn't clear. |
I think we have three options:
|
I'm pro 3, but unable to put in the work for it. |
I'm happy to do the work, but I'll wait a little bit to see if there are any other strong opinions. No matter what, it's an easy change to make and revert if it causes problems in practice. |
You're a complete saint. Could you explain the answer to: "What do you actually lose out on with HISTCONTROL set to ignorespace or ignoreboth? It isn't clear." |
I previously wrote this:
... which isn't quite correct now that I read more of the details. function __ghostty_preexec() {
PS0="$_GHOSTTY_SAVE_PS0"
PS1="$_GHOSTTY_SAVE_PS1"
PS2="$_GHOSTTY_SAVE_PS2"
builtin printf "\033]133;C;\007"
_ghostty_executing=1
} ... so for us, I think we might be able to rip out this whole |
Bash usage just got a whole lot better. Only one more bash issue to go (for me)! |
I confirmed this by unsetting shell-integration and also trying ptyxis just to make sure my bashrc works the way I intend.
The text was updated successfully, but these errors were encountered: