New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Write Text to Console Programmatically #3
Comments
The solution may be either simple or complicated. Actually, I think that greetings message may differ my shell/Task. So, probably the best way is adding something like Final message... Well, may be it may be implemented as Printing while process is running? Hmm... That may harm running process output, or may be overwritten by processes in next second. |
Intuitively I'd prefer the Settings.xml file. It's got |
|
2.1) Still need a way to suppress the standard message by |
|
OK, here is the concept:
|
|
|
On the “clean” terminal startup screen, are you sure? Here's the idea: |
I'm lost. What is the suggestion? |
I'd suggest for adding a switch which makes ConEmu echo the payload command AS IS into the terminal before beginning to execute it. I can see this useful for one pattern of use for conemu-inside. As for the -e | -t things, I'll try them as soon as we get the core nuget, with all the other features. |
|
We've been using GE with ConEmu since early January full-scale on the team. Can say it solves the original problem for sure, and works almost nicely. Thanks for help with the stuff. There're, like, two noticeable glitches though, one of them is this one issue, for it is a slight regression from the original GE functionality. I tried to play with |
Either I misunderstood what you are complaining of, or you tried |
Commands `echo` and `type` are processed internally by ConEmuC now. For example, it's possible to add into the Settings/Environment. echo -x "Welcome to ConEmu %ConEmuBuild% terminal^nPress Win-Alt-P to show Settings dialog" Alternatively, you may add `echo` or `type` before the command itself, when you create new console, or in the Task definition. Example. type -utf8 "%ConEmuDir%\Hello.txt" & cmd /k "%ConEmuBaseDir%\CmdInit.cmd"
Tried it on the main As with
UPD: The commit says it about |
False. Commit says that There is just one drawback. In current sources, Task's |
Screenshots were taken from debug local build of course |
Great! But unlike the conventional |
Actually, one cmdline parser is used everywhere in ConEmu. So the rules are the same.
|
so |
Will have to implement the mangler, otherwise it's no chance git cmdlines will look right. |
Parser - |
1 similar comment
Parser - |
Is there a mangler as well there in cpp? Would like to write a test which takes all possible pairs of symbols in |
Writing a similar thing for command line gave us knowledge that with WinNT command line it is simply not possible to roundtrip an arbitrary string with |
There is no "mangler" in a code, didn't need it yet. As for parser... Anyone may check and compare parser from command line, ConEmuC has special
Can't recall why the rule for double quotes was selected in ConEmu. |
http://stackoverflow.com/a/15262019/1405560 But seems like CommandLineToArgW do not conform rules. Thats why internal parser was written. |
In the native netfx bootstrapper (e.g. this one ) I tried |
… Does not work for empty lines, just echo is ignored and echo "" yields two quotes instead of an empty line.
…t (dangerous). Use it at you own risk! Calling this function may cause unexpected behavior of running console application! That is because function changes console contents and cursor position directly, bypassing detouring standard ConIn/ConOut processing queue. In most cases **safe** functions `Paste`, `Print` and `Keys` are preferable! However, with `Write` you may implement some interesting features, like printing sort of ‘hints’ in shell prompt: Write "\e7\e[90mEcho \"Hello world!\"\e[m\e8" Ref: Maximus5/conemu-inside#3
When all processes in console are finished: * ConEmu does not close the console automatically; * Confirmation message is not written to console; * All keypresses are ignored. So, user may either close console via ConEmu interface (kill hotkeys or close menu items), or parent process (when ConEmu is working in the ‘Inside’ mode) may close the console via GuiMacro `Close(0,1)`. Ref: Maximus5/conemu-inside#3
I've implemented echoing the command and custom greeting text via the environment, and added support for the new |
Here I mean not
stdin
but emulatingstdout
, as if the program has written smth to the console, as the "second stream".99% cases would probably be:
(which means this has to be set up in conemu cmdline or better settings XML, because otherwise we can't guarantee the greeting goes before the payload text)
(which can be set up as customizing the conemuc's "press esc or enter" text, also has to be done before starting)
These two could be seen in wide use e.g. in GitExtensions in the console windows I'm currently in process of upgrading.
Writing smth in the process might also be useful (e.g. we parsed the stage out of the stream and want to comment on it), but is much less critical.
The text was updated successfully, but these errors were encountered: