-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Update shell integration versions #355
base: master
Are you sure you want to change the base?
Conversation
There are two problems:
|
Makes sense, though I would argue that, at least in the case of Bash, it's worth upgrading, as (from what I can tell) the bash-preexec script was added in verison 6. Any suggestions on how to deal with item 2? |
Yeah, there was a big refactor for version 6, but it didn't fix serious problems. It was mostly for code cleanliness and fixed a few things around the edges (like dealing with unusual history settings better and not stepping on aliases). Issue 2 is really hard to fix. The only way to detect it is to see that we get the usual escape sequences in the expected order without a version number report and then offer to fix it. But it will have false positives because some people customize programs like Julia's REPL to do the same thing. I'm open to suggestions since this idea kinda stinks. |
Hmm. When the bash integration didn't advertise a version, did it still advertise that it was running bash? Do you have a particular commit I could look to see what the behavior might have been like at the time? I did a cursory search and couldn't find anything. |
Unfortunately the shell and version are in the same code, so they were lost at the same time. This is the responsible commit: Note how the new version does not call |
I think I figured out a way to deal with this. The bash shell integration script exports the variables
Then bash integration is enabled but didn't advertise the version. It's kinda ugly, but it should work. |
That's a good idea! The only open question is what do for users who are SSH'ed somewhere they've installed shell integration. It might be acceptable to just guess that if you get shell integration escape sequences without the version that it's bash. It'll annoy some Julia users and such, but I think it's a small proportion. |
We could reach out to the TerminalExtensions.jl package and have them add some sort of shell version announcement, even if it's just a dummy value. |
Looks like they already do |
Ah shoot, they never call it. I filed an issue here: Keno/TerminalExtensions.jl#34 |
This is dependent on gnachman/iterm2-website#51 being pushed out to the website.