bash shell on Windows

C

Cheng Rithy

Hi,

I wonder if there are any simulated bash shells for Windows. The shell
should
have at least the following features:

1- Auto-completion of various commands when pressing the TAB key (as in
Linux, there is a daemon managing the command database)
2- Auto-completion of directories when pressing TAB
3- Compatible with Windows's command prompt (cmd.exe or command.com), i.e.,
can recognize internal commands.
4- If possible, work in the background as a hook/interrupt to handle from
inside Windows's command prompt (cmd.exe or command.com)

The "bash_ntXXXX" is far way from my needs.

Thanks,
Rithy
 
R

Reinhardt Kern

Cheng Rithy said:
Hi,

I wonder if there are any simulated bash shells for Windows. The shell
should
have at least the following features:

1- Auto-completion of various commands when pressing the TAB key (as in
Linux, there is a daemon managing the command database)
2- Auto-completion of directories when pressing TAB
3- Compatible with Windows's command prompt (cmd.exe or command.com), i.e.,
can recognize internal commands.
4- If possible, work in the background as a hook/interrupt to handle from
inside Windows's command prompt (cmd.exe or command.com)

The "bash_ntXXXX" is far way from my needs.

Hi Cheng,

1st: The cmd.exe is able to autocomplete Names with <TAB> key
from the very beginning. (This is the default setting in WinXP.)

In all other NT flavors (NT 3.51, NT 4.0, Win2000):

[HKEY_CURRENT_USER\Software\Microsoft\Command Processor]
"CompletionChar"=0x09


2nd: If you real love bash - then use the real stuff:
Of course, there is a windows port: http://www.cygwin.com
It provides real multitasking and full bash script support.
(CMD.EXE is not able to start and manage simultaneous tasks.)
And all the other GNU tools you already know.

Additional you can use all available existing Windows command
line tools. There is no need for any internal CMD command.

But CMD.EXE has one big advantage: It is available on every NT
computer. - CYGWIN.DLL + Bash.exe isn't.

Reinhardt
 
P

Paul R. Sadowski

Do a web search for zshell for Win32. It can emulate bash and other shells.
It was pretty good a few years ago when I used it. Must be even better now.
Well worth a look.
 
C

Cheng Rithy

Ohh... many thanks for this useful registry setting. Now the command prompt
can understand directory and files.

However, pressing TAB to autocomplete a command or to see a list of
available filtered commands (in the PATH variable), including the internal
commands, does not work. Example: C:\>notepa (then press TAB ==> nothing)

Of course, I am a Windows fan and I don't want to use any Unix's shell at
all, except that I wish the ONLY ONE feature of bash: "TAB for
autocompletion" is supported by Windows's command prompt. I tried Cygwin
last week, and I felt like I was using Unix and was far away from my
favorite Windows.

Regards,
Cheng Rithy


Reinhardt Kern said:
Cheng Rithy said:
Hi,

I wonder if there are any simulated bash shells for Windows. The shell
should
have at least the following features:

1- Auto-completion of various commands when pressing the TAB key (as in
Linux, there is a daemon managing the command database)
2- Auto-completion of directories when pressing TAB
3- Compatible with Windows's command prompt (cmd.exe or command.com), i.e.,
can recognize internal commands.
4- If possible, work in the background as a hook/interrupt to handle from
inside Windows's command prompt (cmd.exe or command.com)

The "bash_ntXXXX" is far way from my needs.

Hi Cheng,

1st: The cmd.exe is able to autocomplete Names with <TAB> key
from the very beginning. (This is the default setting in WinXP.)

In all other NT flavors (NT 3.51, NT 4.0, Win2000):

[HKEY_CURRENT_USER\Software\Microsoft\Command Processor]
"CompletionChar"=0x09


2nd: If you real love bash - then use the real stuff:
Of course, there is a windows port: http://www.cygwin.com
It provides real multitasking and full bash script support.
(CMD.EXE is not able to start and manage simultaneous tasks.)
And all the other GNU tools you already know.

Additional you can use all available existing Windows command
line tools. There is no need for any internal CMD command.

But CMD.EXE has one big advantage: It is available on every NT
computer. - CYGWIN.DLL + Bash.exe isn't.

Reinhardt
 
M

Matthias Tacke

Cheng Rithy said:
Ohh... many thanks for this useful registry setting. Now the command prompt
can understand directory and files.

However, pressing TAB to autocomplete a command or to see a list of
available filtered commands (in the PATH variable), including the internal
commands, does not work. Example: C:\>notepa (then press TAB ==> nothing)

Of course, I am a Windows fan and I don't want to use any Unix's shell at
all, except that I wish the ONLY ONE feature of bash: "TAB for
autocompletion" is supported by Windows's command prompt. I tried Cygwin
last week, and I felt like I was using Unix and was far away from my
favorite Windows.

Regards,
Cheng Rithy

You've no luck then, autocompletion works only from current position.
But you could use start in combination with registered file types.

I.e. when .txt is associated with notepad you could type :

start readme.txt

to open notepad and load readme.txt in it.

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top