Posted By: The Channel 9 Team | Oct 19th, 2004 @ 10:50 AM | 123,784 Views | 29 Comments
Last week you saw Jeffrey Snover talking about Monad here on Channel 9. Here's his demo of Monad. Monad is the code-name for a new command shell for Windows.

In this video Jeffrey talks about the five concepts of Monad that you'll need to know to get started.
Media Downloads:
Rating:
0
0
Maurits
Maurits
AKA Matthew van Eerde
Ooh, tab-completion of long filenames!  This is one of the biggest things bash has going for it over cmd.exe.  I'm so happy it's coming to Windows.
Sven Groot
Sven Groot
My name has 9 letters. Coincidence? I think not...
Actually, cmd.exe in Windows XP has tab-completion.

The only thing it's still missing compared to bash in that regard is that it won't work on files in your path, only in the current directory. I wonder if this fixes it. I can't check, because I can neither install the preview nor watch the video, as my computer is acting really really strange. I'm currently working in Knoppix, and it's gone for about 25 minutes now without crashing, which is the best it's done all day. In fact, the previous three attempts in Knoppix all crashed within 30 seconds. At least Windows consistently gives me 3 minutes before giving up.

Looks like a hardware defect, yes, although I can't explain why it's suddenly gone away it seems. If it lasts till the half hour I'm going to boot Windows back up and try my luck with that one more time.
Maurits
Maurits
AKA Matthew van Eerde
Sven Groot wrote:
Actually, cmd.exe in Windows XP has tab-completion.


Really?  Cool!  (Still on Windows 2000 here.)

I see a lot of my favorite command filters (though renamed: tail -> pick-tail, for example.)  Great.
Is there a grep (perhaps by a different name?)  Any kind of regular-expression support?
XP has tab-completion it even supports variables, example:

C:\Windows> edit w*.log

If you hit tab it will search through all the different .log files starting with W. Works great in my experience.

--Drevlan
Win2K has tab-completion as well; it just isn't enabled by default.  Check out HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor in your registry.
I'm probably being too picky, but I was hoping it would have a richer CLI UI rather than being so similar to cmd.exe (one big textbox).  It doesn't need to be a very visual GUI, but there are areas where UI controls can enhance the CLI experience.  I know purests might cringe at adding any UI elements (even menu bars), but they can be added without making them necessary to using the tool
Maurits
Maurits
AKA Matthew van Eerde
Horshu wrote:
Win2K has tab-completion as well; it just isn't enabled by default.  Check out HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor in your registry.


WOW!

Learn something new every day.
Yep, it was there even in NT4 (not sure which SP) though it didn't really work that well and could occasionally crash CMD.EXE. (I used to copy the cmd.exe from Win2k beta to my NT4 workstation Wink It has nice features like it expands wildcards and you can SHIFT-TAB to step backwards through the possible matches when you have been TAB-ing too much. The not so nice feature is that if you edit an existing command line and use tab somewhere in the middle of the string, it will trash all the characters between the cursor and the end of the string. (something that bash doesn't do). About GUI features: What I really hope is that it will be possible to resize the console window without clicking 123 buttons like now. It's a big plus of xterm and rxvt. Transparency would also be cool of course Wink Well, going to watch the video.
staceyw
staceyw
Before C# there was darkness...

"I'm probably being too picky, but I was hoping it would have a richer CLI UI rather than being so similar to cmd.exe"


Yes, many using the beta wish the same including myself.  They are focused on RC1 and have a lot of work in the nuts and bolts.  They currently view cli ui as something that can come latter.   The current UI is the same one any console APP uses.  MSH.exe is just a plain old c# app that loads DLLs.  The MSH engine is a collection of DLLs that the MSH console app hosts.  You will probably see many user attempts at MSH hosts/GUI/CUI apps.  Actually, there is a few beta users that are working on their own hosts.  Myself, I would like to see something similar to the SQL command utils.  Where you have a command window and a results window, etc.  As a c# user, I would also like to see deep integration of msh into the cmd/immediate windows and internal scripting in VS.Net.

cmdlets are user commands (c# dlls) that msh invokes and your dll becomes part of the pipeline for inspection or injection in the pipeline.

--
wjs, mvp 

staceyw wrote:

Actually, there is a few beta users that are working on their own hosts.  Myself, I would like to see something similar to the SQL command utils.  Where you have a command window and a results window, etc.  As a c# user, I would also like to see deep integration of msh into the cmd/immediate windows and internal scripting in VS.Net.

cmdlets are user commands (c# dlls) that msh invokes and your dll becomes part of the pipeline for inspection or injection in the pipeline.

--
wjs, mvp 



Funny you should mention that...I wrote my own CLR app (for communicating with a multi-component distributed app) that is similar (piping, including scripts, everything's an object) but has a mIRC-like interface (input textbox on the bottom and output text above, but I allow the input textbox to be switched from single line to expandable).  It's really interesting when the thing "speaks" .Net, because the power you expose is unreal.  For instance, mine really talks to a finite set of components, but because it's .Net, it could probably talk Monad, too, and vice versa.
I really like some of the aspects of Monad, but not being a CLI person myself, I didn't "get" the format in terms of how you pass/pipe things...could be because watching Jeffrey type in commands, I couldn't really understand the format being parsed...too flexible I guess.  Mine supports ">" and "<" bi-directional parsing (fully configurable, as the pipes are just "sentence" delimiters, so I guess I could add |), <verb> <noun> <params> formatting, script support, but I defined a very restricted sentence format with all the complexity in the piping order.  Monad kinda blew my notion of a grammar out the window, so I'm still trying to wrap my head around it Smiley
Microsoft Communities