Code change:
Issue Type: <bBug</bI do not see the error or success icons for the gutter icon on my shell integration enabled terminals; instead it is always the empty circle. The integration appears to otherwise be working (the Go to Recent Directory and Run Recent Command commands are working as expected). I presume that somehow, the integration is not picking up the result of the operation being run. For reference, I am using but otherwise don't believe I have anything special in my Bash configuration that would affect this. VS Code version: Code 1.68.0 (Universal) (, 2022-06-08T11:44:00.250Z) OS version: Darwin x64 21.5.0 Restricted Mode: No <details<summarySystem Info</summary </details<details<summaryExtensions (76)</summaryExtensionVersion ------ Bookmarks13.3.0 project-manager12.6.0 vscode-sqlite0.14.1 atlascode2.10.12 github-markdown-preview0.3.0 jsdoc-markdown-highlighting0.0.1 markdown-checkbox0.3.2 markdown-emoji0.2.1 markdown-footnotes0.0.7 markdown-mermaid1.14.0 markdown-preview-github-styles1.0.1 markdown-yaml-preamble0.1.0 gitignore0.7.0 vscode-markdownlint0.47.0 vscode-eslint2.2.2 xml2.5.1 gitlens12.0.7 EditorConfig0.16.4 graphviz-preview1.5.0 flow-for-vscode2.1.0 vscode-mysql0.4.1 copilot1.28.6134 remotehub0.34.0 vscode-pull-request-github0.44.0 go0.33.1 todo-tree0.0.215 triggertaskonsave0.2.17 vscode-guid1.4.20 path-autocomplete1.19.1 tablegenerator1.0.4 plantuml2.17.2 svg1.4.18 docthis0.7.1 vscode-position1.1.2 yarn-lock-syntax0.1.3 Kotlin1.7.1 vscode-language-babel0.0.36 pull-request-quantifier0.1.2 extension-manifest-editor0.1.5 csharp1.25.0 dotnet-interactive-vscode1.0. network-edge-devtools1.0.0 data-workspace-vscode0.2.0 mssql1.14.2 sql-bindings-vscode0.1.0 sql-database-projects-vscode0.16.2 vscode-postgresql0.3.0 python2022.8.0 vscode-pylance2022.6.10 jupyter2022.5. jupyter-keymap1.0.0 jupyter-renderers1.0.8 hexeditor1.9.6 powershell2022.5.1 remote-repositories0.12.0 vscode-js-profile-flame1.0.2 vsliveshare1.0.5615 vsliveshare-pack0.4.0 resourcemonitor1.0.7 vscode-commons0.0.6 vscode-yaml1.8.0 sass-indented1.5.1 gitconfig2.0.1 mdx0.1.0 codevalet-vscode1.5.0 vcl0.1.2 msbuild-project-tools0.4.3 jest-snapshot-language-support1.1.1 intellicode-api-usage-examples0.1.1 vscodeintellicode1.2.21 vscode-icons11.12.0 quokka-vscode1.0.478 wallaby-vscode1.0.338 jinja0.0.8 ReactSnippets2.4.0 vscode-proto30.5.5 (2 theme extensions excluded) </details<details<summaryA/B Experiments</summary</details<!-- generated by issue reporter --
It's working fine for me (I have the icon customized): <img width="447" alt="Screen Shot 2022-06-10 at 11 29 56 am" src="https://user-"This is with a fresh install of stable bash-git-prompt Version: 1.69.0-insider Commit: Date: 2022-06-10T05:16:48.648Z Electron: 17.4.7 Chromium: 98.0.4758.141 16.13.0 V8: 9.8.177.13-electron.0 OS: Darwin x64 21.5.0 Could you see if it happens on the ?
I am installing the Insiders build now. I will let you know.
Hmmm, doesn't seem to work. <img width="232" alt="image" src="https://user-"
How does it detect the exit code? Perhaps I have something installed that is interfering, either in my bash config or elsewhere?
Yeah it's meant to change depending on the exit code of the program. Some info that would help us investigate: Set log level to debug via the command palette, then in Help Developer Tools console it will show some shell integration related logs when you run a command Do you set PROMPT_COMMAND anywhere? Do you use bash-preexec?
I'll get this going and let you know. Ah yes, besides using , I have this in my bash config: I'll try disabling that and see what happens. It would be a shame to lose it but perhaps there's a better way of implementing that so that it's compatible, if that turns out to be the issue. Not that I am aware of, no.
OK, so I disabled my PROMPT_COMMAND change and tried a few things in a new terminal that weren't working before. Now, when I use it is still an empty circle, but when I do , I get the green success lozenge!! So I'm guessing that was the main issue; though I do wonder if I should be seeing that green circle for and such too (that said, this is the non-Insiders build - I'll try Insiders in a second). I'll add the log level and see what I get.
I can confirm that the Insiders build works as advertised now, so it was my history manipulation code that was getting in the way. Thank you for helping out. I'll close this issue as it appears to be an issue on my side, not yours. Thank you for helping troubleshoot.
Let's keep this open to track the issue so we handle it better.
would you like me to gather the logging info as requested, since this is staying open?
I think we understand the problem enough to reproduce it, it's just a case we need to detect and handle better.
This is happening because we actually depend on to differentiate regular commands that succeeded or failed vs ones exited via or running an empty line. Specifically this call: I'll disable shell integration if includes as that specifically is the reason it was failing.
<!-- AUTHORVERIFICATIONREQUEST --This bug has been fixed in the latest release of ! you can help us out by commenting if things are now working as expected. If things still don't seem right, please ensure you're on version of Insiders (today's or later - you can use in the command palette to check), and leave a comment letting us know what isn't working as expected. Happy Coding!
To verify: In set Enable the shell integration Open a terminal, it should not have shell integration enabled
/verified I see that the integration is not enabled as the lozenges are missing.

Related discussion:
text: builtin return fi <ins> # Disable shell integration if HISTCONTROL is set to erase duplicate entries as the exit code # reporting relies on the duplicates existing if [[ "$HISTCONTROL" =~ .*erasedups.* ]]; then builtin unset VSCODE_SHELL_INTEGRATION builtin return fi </ins> if [ -z "$VSCODE_SHELL_INTEGRATION" ]; then builtin return fi