Monad Hosting Part II — Stop acting like cmd.exe!

Travis recently posted a good comment:

... I would *love* to be able to configure Monad's tab completion behavior! ...

So would we.

Tab completion is just one of the many things that would be great to change about the default Monad console host.  Other things that drive us crazy are the lack of standard CUA bindings (ie: Copy, Paste, keyboard-based selection,) and full Unicode support, to name a few.  It's comes down to a matter of priority.

As I mentioned in an earlier post, Monad can be hosted by any managed application that wishes to do so.  Hosting applications need only to implement a fairly simple interface in order to host the engine.  Our default host, msh.exe, owes nearly all of its functionality to the fact that we use the same infrastructure that cmd.exe does.  With relatively little code, we get passable tab completion, history cycling, and a bevy of function keys that are pretty useful.  Changing any of this means writing huge gobs of code.

We did write some special code to tab-complete cmdlet names, but that was a fairly isolated change.

For this release, we've focused our effort on really fleshing out the underlying Monad engine, APIs, and infrastructure.  These are the things that hurt the most when they are missing, and ultimately empower many, many more of you.  Writing a more functional host is on our list of things to do in a future version.

That said, this is the type of thing that the Monad community could easily astound us with.  Several BetaPlace members started writing a GUI host during our much earlier betas, but I haven't seen much activity on it lately.  A Microsoft empoyee wrote a neat WinForms application that hosts Monad in a tabbed interface.  Do you want transparency?  Tabs?  Background images? Awesome tab completion?  Go for it!  Our team (via the BetaPlace newsgroups) loves to help, should you want it or need it.

 

[Edit: Monad has now been renamed to Windows PowerShell. This script or discussion may require slight adjustments before it applies directly to newer builds.]

6 Responses to “Monad Hosting Part II — Stop acting like cmd.exe!”

  1. Bryan Livingston writes:

    What I’ve always missed is Control-D to exit. I use it all the time on linux and am always tring to use it in the ole winders.

  2. Lee Holmes writes:

    One option is to set it as a function in your profile:

    function ^D { exit }

    (that’s the keypress ^D, not the individual characters.)

    Then, ^D[ENTER] will exit your shell.

  3. Andre writes:

    Where one can find "A Microsoft employee wrote a neat WinForms application that hosts Monad in a tabbed interface" for download? I don’t now how long I’m looking for a tabbed interface for cmd.exe or msh.exe now. Thanks in Advance. Andre

  4. Lee Holmes writes:

    Hi Andre; he’s shared the source inside of Microsoft, but I don’t think he’s ever had the motivation to share it outside. I’ll ask him if he’s interested.

  5. Niels writes:

    How about leveraging IE to render the output? 🙂 Could be nice to have decent formatting using html tags, directly show pictures in the command line, format data into tables etc.

  6. Lee writes:

    Absolutely, Niels.

    If you haven’t already, try exploring the convert-html cmdlet. That may get you a lot of the functionality that you’re looking for.

    Lee

Leave a Reply