mirror of
https://github.com/cmderdev/cmder.git
synced 2024-11-10 09:49:12 +08:00
Bare doubledash for conemu commands (#2174)
* Add bare doubledash command line option 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. * add bare doubledash command line option The "--" option indicates that the remaining portion of the command line is forwarded to conemu. Quotes and spacing is retained. * move all doubledash related code together * remove unused variable
This commit is contained in:
parent
19a2fd11e3
commit
e4651cf7b4
@ -633,6 +633,17 @@ cmderOptions GetOption()
|
|||||||
cmderOptions.cmderConEmuArgs = szArgList[i + 1];
|
cmderOptions.cmderConEmuArgs = szArgList[i + 1];
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
/* Bare double dash, remaining commandline is for conemu */
|
||||||
|
else if (_wcsicmp(L"--", szArgList[i]) == 0)
|
||||||
|
{
|
||||||
|
std::wstring cmdline = std::wstring(GetCommandLineW());
|
||||||
|
auto doubledash = cmdline.find(L" -- ");
|
||||||
|
if (doubledash != std::string::npos)
|
||||||
|
{
|
||||||
|
cmderOptions.cmderConEmuArgs = cmdline.substr(doubledash + 4);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
else if (cmderOptions.cmderStart == L"")
|
else if (cmderOptions.cmderStart == L"")
|
||||||
{
|
{
|
||||||
int len = wcslen(szArgList[i]);
|
int len = wcslen(szArgList[i]);
|
||||||
|
Loading…
Reference in New Issue
Block a user