It's because your OPEN WITH
for .sh
files is set to notepad
.
Check below output:
my_prompt> assoc .sh
.sh=sh_auto_file
^ ^ ^ ^ ^ ^ ^ <~~~~~~ Remember this name
my_prompt> ftype sh_auto_file <~~~~~~~~~~Use it here
sh_auto_file=%SystemRoot%\system32\NOTEPAD.EXE %1
You can change the association with:
my_prompt> ftype sh_auto_file=c:\cygwin\bin\bash.exe %1 %*
(Change the path for bash.exe as per your setup...)
For more details, run commands assoc /?
& ftype /?
on cmd.exe
. (/?
is typical equivalent of -h
or --help
in Linux commands...)
Also, for more advanced users, check in registry for HKCR\.sh
& HKCR\sh_auto_file
.
You can use regedit
for it.