The prompt under preferences exists but the dropdown has Git Bash greyed out and cannot be selected.
OS: Win 10
Git: 2.27.0.Windows.1
Local: 5.6.6
Example of WP-CLI command that does not work under windows basic prompt
wp post delete $(wp post list … --format=ids)
Ideal would be some form of command that I can run from VS Code terminal that would instantiate the Local/Lightning goodness to make that terminal able to execute when within a directory of the site (or where wp-cli.yml has been configured). Under Local 3.X this was possible through running the same .bat at what local itself ran.
Thanks for the heads-up! Local checks the following paths for Git Bash.
%ProgramW6432%\Git\git-bash.exe
%ProgramFiles%\Git\git-bash.exe
Is Git Bash installed in another location on your device?
There is a .sh file that gets generated now that’s adjacent to the .bat files. You should be able to execute it in VS Code as long as the terminal open in VS Code supports shell scripts.
%USERPROFILE%\AppData\Local\Programs\Git
It appears 2.19+ that change in the Git for Windows setup started.
YES!
For those who want to go this route without having to dig/remember deep paths to access this every time, I recommend:
One time
Start Local with only your current site running
Go to ~/AppData/Roaming/Local/ssh-entry/
Copy the filename/path for the only .sh that is currently listed
Go to your VS Code project workspace (same place that /app/public/ would contain your WP installation) and create ssh.sh with one line to execute the Local specific .sh file. Example
“sh ~/AppData/Roaming/Local/ssh-entry/_LL1zMTxi.sh”
Any/Every time
Ensure your Local site is started
From your VS Code terminal run “sh ssh.sh” and the local script will run giving you WP-cli goodness!
** Optional: Add that script to your .bashrc or .bash_profile to have it execute anytime the VS Code terminal opens.*