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

Bare doubledash #2174

Merged
merged 4 commits into from
Oct 6, 2019
Merged

Bare doubledash #2174

merged 4 commits into from
Oct 6, 2019

Conversation

mdavis199
Copy link
Contributor

Add a "--" command line option so Cmder can be launched with any conemu command. The command line after the double dash is forwarded as is. Quotes and spaces are retained so that there is no need for complex escaping.

It greatly simplifies launching project-specific consoles/commands without requiring that Tasks be created for each project.

For example:
This is a batch file that I am using in a real project where I am updating a software package. This batch file launches Cmder with (1) a console running Docker with the original software, (2) a console running Docker with the new backend software, (3) a console running a development node server, (4) a console that I work from.

e:\apps\tools\cmder\cmder.exe -- -runlist ^
cmd -new_console:d:"E:\Projects\mfd\original-docker":t:"Docker Original" /k "addpath docker && docker-compose up" "|||" ^
cmd -new_console:d:"E:\Projects\mfd\newui":t:"Docker NewUI" /k "addpath docker &&  docker-compose up" "|||" ^
cmd -new_console:d:"E:\Projects\mfd\newui\frontend":t:"Yarn Start" /k "addpath node &&  yarn start" "|||" ^
cmd -new_console:d:"E:\Projects\mfd\newui\frontend":t:"newui" /k "addpath node"

It can have spaces in paths and names without escapes.

Note:
I have not updated the Readme or the popup help window. I have not removed the "/x" option, though it may not be needed now.

The '--' parameter is a common POSIX-style option.  All command-line parameters after the double dash will be joined by a space and forwarded to conemu.
The "--" option indicates that the remaining portion of the command line is forwarded to conemu. Quotes and spacing is retained.
@daxgames
Copy link
Member

Thats crazy! Thanks for the PR. I will look at it later, watching football today.

Copy link
Member

@MartiUK MartiUK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@MartiUK MartiUK merged commit e4651cf into cmderdev:master Oct 6, 2019
@Otiel
Copy link

Otiel commented Nov 25, 2019

@mdavis199 Thanks, I can finally ditch my intermediary batch files!

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

Successfully merging this pull request may close these issues.

5 participants