Skip to content
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

Merging cmdEx into Cmder/Clink #3

Closed
DRSDavidSoft opened this issue Feb 23, 2018 · 3 comments
Closed

Merging cmdEx into Cmder/Clink #3

DRSDavidSoft opened this issue Feb 23, 2018 · 3 comments

Comments

@DRSDavidSoft
Copy link

This feature of getting rid of Ctrl+C→Y on cmdEx is quite handy. Since someone at cmderdev/cmder/issues/1666 asked for it, and Clink is forked (the author's been disappeared), I was wondering if it's possible to either run cmdEx alongside Clink (within Cmder), or to merge cmdEx functionality with the Clink's fork.

What do you suggest is the better way to implement cmdEx's functionalities for Cmder?

@sgraham
Copy link
Owner

sgraham commented Feb 23, 2018

I suspect Clink and cmdEx wouldn't work well together as they're both futzing around inside cmd in similar ways, so their patches are unlikely to work together.

The other problem is that the Ctrl-C functionality isn't quite baked in cmdEx unfortunately. The part in the readme about adding to "HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun" is necessary to make the Ctrl-C suppression work properly everywhere, but the startup time of cmdEx is way too slow for that.

I had some ideas to make injection much faster so that could be done, but nothing not implemented yet. (I also don't develop on a Windows box too often right now either, so I'm not likely to get to that any time soon.)

@DRSDavidSoft
Copy link
Author

I understand that, though I don't know how cmdEx works to suppress Ctrl-C. What is the main cause of it being slow? Could you give a summary of what do you have in mind to make it faster?

Also, would it make sense to rewrite it as a ConEmu interface (Maximus5/ConEmu/issues/270)?

If I could do it, I'm eager to modify both cmdEx and Clink to make this functionality as smooth as possible :)

@sgraham
Copy link
Owner

sgraham commented Feb 24, 2018

The Ctrl-C patch is here: https://github.com/sgraham/cmdEx/blob/master/src/cmdEx_dll_x86_dll/dll.cc#L1010

It's been a while, but I think the startup time was mostly dominated by unpacking resources (I bundled everything into one .exe for simple distribution) and then symbol acquisition. I vaguely planned to cache some of that, but really it'd just need profiling and elbow grease.

I think if you just want to get Ctrl-C prompt suppression, I'd probably instead try to make a minimal version of that patching code standalone instead, and put just that .exe into cmd's AutoRun.

I never switched to ConEmu, so I don't have a horse in that race, still on an old Console2. :/

@sgraham sgraham closed this as completed Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants