bmatzelle / gow

Unix command line utilities installer for Windows.
https://github.com/bmatzelle/gow/wiki
6.58k stars 365 forks source link

"Clear" command doesn't work on Windows 10 #230

Open emkultra64 opened 8 years ago

emkultra64 commented 8 years ago

For whatever reason, Gow doesn't want to be able to run clear on my windows 10 installation.

When I typing it in, I get the following output: bash.exe: clear: command not found

Typing in the absolute path doesn't execute the command either, and calling cls while in bash produces the same "not found" error. cls does, however, work fine under normal cmd.exe.

emkultra64 commented 8 years ago

A good work around is to create a new script that will clear the screen the way cls does under MSYS. Just use the following commands to create the script:

cd /bin
echo 'echo -ne "\033[2J"' > clear
bytehead- commented 8 years ago

The reason it doesn't work in bash.exe is because it's a a batch file (clear.bat), which contains simply

@echo off cls

And since bash doesn't handle bat files, nor would it handle batch commands if it did... It's not supposed to work that way.

emkultra64 commented 8 years ago

My bad, I was under the impression that bash under gow was essentially meant to be the default shell. I see now that the purpose of gow is mainly to add unix commands to cmd.exe rather than provide a full bash shell that would replace cmd entirely.

Nonetheless, it would be good for there to be a version of clear that is compatible with bash included in the default installation. Maybe not necessarily replacing clear.bat, since that would interfere with using it under the default Windows shell, but maybe as an extensionless file like I mentioned?

mvheslin commented 7 years ago

MikeIronFist, thanks for the suggestion. While I did not make it a file in bin I did make it an alias in my bashrc. Fixed my problem. Thanks again.