mirror of
				https://github.com/cmderdev/cmder.git
				synced 2025-10-31 09:22:15 +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:
		| @@ -633,6 +633,17 @@ cmderOptions GetOption() | ||||
| 				cmderOptions.cmderConEmuArgs = szArgList[i + 1]; | ||||
| 				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"") | ||||
| 			{ | ||||
| 				int len = wcslen(szArgList[i]); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user