Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Comments at the command line?

May
15,098
271
So far, possibly just for self amusement, I have done this in a plugin. It should be self-explanatory. I'd welcome comments, questions, and suggestions.

In the first, I'm not overloading the COMMENT command. In both, keyhandler processed "Enter" and looks for "comment" or "clipcomment".

The first uses the INPUT command so I can have some editing capabilities when typing each line. In the second I must manually paste and then process the STD_INPUT_HANDLE. I might try automatically outputting what's in the clipboard, but I don't like working with the clipboard API.

It's kind of a mess but I'm having fun!

1762988122590.webp
 
Are you wanting to do what a here-string does in PowerShell?
Code:
PS R:\> $text = @"
>> Line 1
>> Line 2
>> Line 3
>> "@
PS R:\> $text
Line 1
Line 2
Line 3

Joe
 
Not exactly. I want the user to simply provide it without any need to provide it and later get it. I'm going to make commands out of them, maybe CLCOMMENT (type the comment) and CLCOMMENT /C (insert the clipboard before the next prompt). Now that I think of it, that's a lot (maybe exactly) like TYPE CLIP:. As I said this might be just amusement.
 
This has evolved a lot. As before, I'd welcome comments, questions, and suggestions.

1763221314817.webp
 
Back
Top