mirror of
https://github.com/cmderdev/cmder.git
synced 2025-01-11 00:39:08 +08:00
Add initial Windows Terminal support
This commit is contained in:
parent
d75ba7bce2
commit
74c183c2a7
@ -510,11 +510,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
|
|||||||
|
|
||||||
if (is_single_mode)
|
if (is_single_mode)
|
||||||
{
|
{
|
||||||
if (PathFileExists(windowsTerminalDir)) {
|
if (!PathFileExists(windowsTerminalDir)) {
|
||||||
swprintf_s(args, L"%s -w 0 nt", args);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
swprintf_s(args, L"%s /single", args);
|
swprintf_s(args, L"%s /single", args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -750,21 +746,21 @@ cmderOptions GetOption()
|
|||||||
cmderOptions.cmderTask = szArgList[i + 1];
|
cmderOptions.cmderTask = szArgList[i + 1];
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
else if (_wcsicmp(L"/title", szArgList[i]) == 0)
|
else if (_wcsicmp(L"/title", szArgList[i]) == 0 && !PathFileExists(windowsTerminalDir))
|
||||||
{
|
{
|
||||||
cmderOptions.cmderTitle = szArgList[i + 1];
|
cmderOptions.cmderTitle = szArgList[i + 1];
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
else if (_wcsicmp(L"/icon", szArgList[i]) == 0)
|
else if (_wcsicmp(L"/icon", szArgList[i]) == 0 && !PathFileExists(windowsTerminalDir))
|
||||||
{
|
{
|
||||||
cmderOptions.cmderIcon = szArgList[i + 1];
|
cmderOptions.cmderIcon = szArgList[i + 1];
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
else if (_wcsicmp(L"/single", szArgList[i]) == 0)
|
else if (_wcsicmp(L"/single", szArgList[i]) == 0 && !PathFileExists(windowsTerminalDir)) {
|
||||||
{
|
{
|
||||||
cmderOptions.cmderSingle = true;
|
cmderOptions.cmderSingle = true;
|
||||||
}
|
}
|
||||||
else if (_wcsicmp(L"/m", szArgList[i]) == 0)
|
else if (_wcsicmp(L"/m", szArgList[i]) == 0 && !PathFileExists(windowsTerminalDir))
|
||||||
{
|
{
|
||||||
cmderOptions.cmderUserCfg = false;
|
cmderOptions.cmderUserCfg = false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user