When I type "start" to open up a .txt file, it returns /usr/bin/start: line 8: No such file or directory
I guess it returns my whole path but idk.
I have tried adding C:\Windows\System32 to path but it doesn't work.
When I type "start" to open up a .txt file, it returns /usr/bin/start: line 8: No such file or directory
I guess it returns my whole path but idk.
I have tried adding C:\Windows\System32 to path but it doesn't work.
Copyright © 2021 Jogjafile Inc.
In git bash,
/usr/bin/startis a shell script that invokes"$COMSPEC" //c start "${@//&/^&}". If invoked with a.txtfile as an argument. You can examine the file itself; it's an 8-line text file.It's specific to git bash under Windows. It's a way to provide the equivalent of the
cmd.exeSTARTcommand, or double-clicking on a Windows icon, in a Unix-like environment. (Cygwin and WSL, which are also Unix-like environments under Windows, don't provide the same thing; Cygwin hascygstart, and WSL is more isolated from the Windows environment.)If you invoke it as
start foo.txt, it should invoke your default handler for*.txtfiles, determined by your Windows settings. That might be Notepad by default, but perhaps you've configured it to be some other editor.Try
echo "$COMSPEC". The result should beC:\WINDOWS\system32\cmd.exe. The/usr/bin/startscript seems to be complaining that the command that$COMSPECexpands to does not exist; either$COMSPEChas been changed, orC:\WINDOWS\system32\cmd.exeis unavailable (the latter could indicate a damaged Windows system).If you type
"$COMSPEC"(with the double quotes) at the git bash prompt, it should give you a Windowscmdprompt; if so, you can leave it by typingexit.