MicrosoftDocs / terminal

Creative Commons Attribution 4.0 International
475 stars 183 forks source link

Instructions for new tab same directory for MINGW (using git bash) does not work #816

Closed JasonGoemaat closed 2 days ago

JasonGoemaat commented 2 days ago

Type of issue

Code doesn't work

Feedback

PROMPT_COMMAND=${PROMPT_COMMAND:+"$PROMPT_COMMAND; "}'printf "\e]9;9;%s\e\\" "`cygpath -w "$PWD" -C ANSI`"'

I've spent a few hours messing around trying to figure out what might be wrong and tried countless variants. Using this solution there is an extra backslash \ before my prompt.

Also .bashrc is no longer run by git bash, I had to use .bash_profile

$ git --version git version 2.24.1.windows.2 C:\Users\jason jason@LAPTOP-KUS5B2I0 MINGW64 ~ $ bash --version GNU bash, version 4.4.23(1)-release (x86_64-pc-msys)

Page URL

https://learn.microsoft.com/en-us/windows/terminal/tutorials/new-tab-same-directory

Content source URL

https://github.com/MicrosoftDocs/terminal/blob/main/TerminalDocs/tutorials/new-tab-same-directory.md

Author

@zadjii-msft

Document Id

439baddf-3ec9-a46e-1b6e-3ec47cbd1d4c

JasonGoemaat commented 2 days ago

Upgrading git seems to have fixed it, sorry

DHowett commented 2 days ago

Oh thanks for following up!