From 0a5d1ac156ac8d1fc0e2e55a74c1501f051f3a2a Mon Sep 17 00:00:00 2001 From: Shahzeb Ihsan Date: Fri, 17 Mar 2017 10:26:57 +0800 Subject: [PATCH 01/14] Use cat -n for printing history to show cmd index Currently the "history" command in Cmder prints commands without any index associated with any command, so you can copy/paste a command or use "!!" to execute a command from the history but, unlike BASH, you can't do "!". "cat" has a switch, "-n", which prints line numbers of the file being printed. This, in conjunction with "history_io=3" in Clink settings (to read/write history when editing a command") works just like BASH, i.e., you can use the index printed next to a command in the history to execute that command as "!". --- vendor/user-aliases.cmd.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/user-aliases.cmd.example b/vendor/user-aliases.cmd.example index 01df318..5279705 100644 --- a/vendor/user-aliases.cmd.example +++ b/vendor/user-aliases.cmd.example @@ -9,7 +9,7 @@ gl=git log --oneline --all --graph --decorate $* ls=ls --show-control-chars -F --color $* pwd=cd clear=cls -history=cat %CMDER_ROOT%\config\.history +history=cat -n %CMDER_ROOT%\config\.history unalias=alias /d $1 vi=vim $* cmderr=cd /d "%CMDER_ROOT%" From d8444dae973322e1052a6773cffdb604e489154c Mon Sep 17 00:00:00 2001 From: Shahzeb Ihsan Date: Fri, 17 Mar 2017 10:59:12 +0800 Subject: [PATCH 02/14] Set history_io=3 in default Clink settings Currently the "history" command in Cmder prints commands without any index associated with any command, so you can copy/paste a command or use "!!" to execute a command from the history but, unlike BASH, you can't do "!". "cat" has a switch, "-n", which prints line numbers of the file being printed. This, in conjunction with "history_io=3" in Clink settings (to read/write history when editing a command") works just like BASH, i.e., you can use the index printed next to a command in the history to execute that command as "!". --- vendor/init.bat | 1 + 1 file changed, 1 insertion(+) diff --git a/vendor/init.bat b/vendor/init.bat index 730efea..b874709 100644 --- a/vendor/init.bat +++ b/vendor/init.bat @@ -26,6 +26,7 @@ if "%PROCESSOR_ARCHITECTURE%"=="x86" ( :: Tell the user about the clink config files... if not exist "%CMDER_ROOT%\config\settings" ( + set clink.history_io=3 echo Generating clink initial settings in "%CMDER_ROOT%\config\settings" echo Additional *.lua files in "%CMDER_ROOT%\config" are loaded on startup. ) From f39b921121f3c4c99741cc33ef6bb554f5b2a69d Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 31 Mar 2019 16:11:14 -0400 Subject: [PATCH 03/14] fixes --- .github/issue_template.md | 54 ++++++++++++++++----------------- vendor/user_aliases.cmd.default | 2 +- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/.github/issue_template.md b/.github/issue_template.md index 2806b29..e3fc4e5 100644 --- a/.github/issue_template.md +++ b/.github/issue_template.md @@ -2,86 +2,86 @@ Thank you for reporting a bug for the Cmder project! ------------------------------------------------------------------ - + Please make sure you read and follow the following instructions carefully before reporting bugs, and/or requesting new features. - + Make sure that you have: - + • Searched for existing issues (including the **closed** ones) for the similar problems here: - + https://github.com/cmderdev/cmder/issues?q=is:issue - + • Read both the README.md and the Wiki: - + - https://github.com/cmderdev/cmder/blob/master/README.md - https://github.com/cmderdev/cmder/wiki - + (What you may be asking here could already be explained there!) - + • Please understand that Cmder uses ConEmu as the default underlying Terminal Emulator. If your issue is regarding the **Terminal Emulator**, please visit the ConEmu issues page: - + https://github.com/Maximus5/ConEmu/issues?q=is:issue - + If there isn't an existing issue, you may open a new one there. - - (We don't resolve issues regarding ConEmu here, so please + + (We don't resolve issues regarding ConEmu here, so please make sure you open the issue in the correct place.) more info: https://conemu.github.io/en/ThirdPartyProblems.html - + • If you would like to ask for guides on how to integrate Cmder with your favorite IDE of choice, or how to perform a specific task with Cmder, make sure you visit our label section first. - + You may already have an answer under the Guides or Questions section. For a list of labels, visit: - https://github.com/cmderdev/cmder/labels (Be sure to also check “Closed” issues in the labels section!) - + • If you have a request to provide auto-complete support for a new tool, please post your request here: - + https://github.com/vladimir-kotikov/clink-completions/issues - + • If you are having an issue with any of the **upstream technologies** that are used by Cmder, please make sure that the issue is reproducible _only_ when used in combination with Cmder. - + We may not directly address the issues related to the following tools: - Clink, the default shell in Cmder - ConEmu, the terminal emulator - Git/MinGW, which also provide *NIX tools - clink-completions, which provide autocompletion - + The issues related to upstream technologies are labeled as 👆 [name]. - + We'll try our best to help you -- but we recommend creating an issue specifically at each of the corresponding repositories for the best result. - + ► Try to reproduce the bug you're reporting, on a stand-alone edition of each tool, without using Cmder. If the bug applies when the mentioned tools are NOT used within Cmder, there's a good chance that you should open the bug at the corresponding repo instead. - + • Lastly, have a look at official documentation for Cmder over our website, and our wiki. Read more on about Cmder on ConEmu docs: https://conemu.github.io/en/cmder.html - - + + Thank you for making sure you are opening a new valid issue! ♥ - + --> - -### Description of the issue +### Description of the issue diff --git a/vendor/user_aliases.cmd.default b/vendor/user_aliases.cmd.default index 5279705..4221684 100644 --- a/vendor/user_aliases.cmd.default +++ b/vendor/user_aliases.cmd.default @@ -9,7 +9,7 @@ gl=git log --oneline --all --graph --decorate $* ls=ls --show-control-chars -F --color $* pwd=cd clear=cls -history=cat -n %CMDER_ROOT%\config\.history +history=cat -n "%CMDER_ROOT%\config\.history" unalias=alias /d $1 vi=vim $* cmderr=cd /d "%CMDER_ROOT%" From 52eea5fe9ff5264581bf825d718fa0d3b7a3147f Mon Sep 17 00:00:00 2001 From: Joshua Webb Date: Fri, 19 Apr 2019 16:16:45 +1000 Subject: [PATCH 04/14] Close file handles in clink.lua --- vendor/clink.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/vendor/clink.lua b/vendor/clink.lua index d5f6876..d39a5ac 100644 --- a/vendor/clink.lua +++ b/vendor/clink.lua @@ -189,12 +189,15 @@ end -- @return {false|mercurial branch name} --- local function get_hg_branch() - for line in io.popen("hg branch 2>nul"):lines() do + local file = io.popen("hg branch 2>nul") + for line in file:lines() do local m = line:match("(.+)$") if m then + file:close() return m end end + file:close() return false end @@ -204,12 +207,15 @@ end -- @return {false|svn branch name} --- local function get_svn_branch(svn_dir) - for line in io.popen("svn info 2>nul"):lines() do + local file = io.popen("svn info 2>nul") + for line in file:lines() do local m = line:match("^Relative URL:") if m then + file:close() return line:sub(line:find("/")+1,line:len()) end end + file:close() return false end From 9b9bb13f6a694e366c076b94f7726b8a18b3e2b1 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 5 May 2019 17:06:44 -0400 Subject: [PATCH 05/14] fix commnd line help --- vendor/bin/alias.cmd | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/vendor/bin/alias.cmd b/vendor/bin/alias.cmd index 999e5a0..e5269f5 100644 --- a/vendor/bin/alias.cmd +++ b/vendor/bin/alias.cmd @@ -144,26 +144,36 @@ exit /b :p_help echo.Usage: echo. -echo. alias [options] [alias=alias command] or [[create [alias] [alias command]]] +echo. alias [options] [alias=alias command] +echo. +echo OR +echo. +echo. alias create [alias] [alias command] echo. echo.Options: echo. -echo. Note: Options MUST precede the alias definition. +echo. Note: Options MUST precede the alias definition. echo. -echo. /d [alias] Delete an [alias]. -echo. /f [macrofile] Path to the [macrofile] you want to store the new alias in. -echo. Default: %cmder_root%\config\user_aliases.cmd -echo. /reload Reload the aliases file. Can be used with /f argument. -echo. Default: %cmder_root%\config\user_aliases.cmd +echo. /d [alias] Delete an [alias]. +echo. /f [macrofile] Path to the [macrofile] you want to store the new alias in. +echo. Default: %cmder_root%\config\user_aliases.cmd +echo. /reload Reload the aliases file. Can be used with /f argument. +echo. Default: %cmder_root%\config\user_aliases.cmd echo. -echo. If alias is called with no parameters, it will display the list of existing aliases. +echo. If alias is called with no parameters, it will display the list of existing +echo. aliases. echo. echo. In the alias command, you can use the following notations: echo. -echo. ^^^^^^^^%% - '%%' in env vars must be escaped if preserving the variable in the alias is desired. -echo. $* - allows the alias to assume all the parameters of the supplied command. -echo. $1-$9 - Allows you to seperate parameter by number, much like %%1 in batch. -echo. $T - Command seperator, allowing you to string several commands together into one alias. +echo. ^^^^^^^^%% - %% signs in env vars must be escaped if preserving the variable +echo. in he alias is desired. Variables in aliases surrounded by double +echo. quotes only require '^^%%' vs '^^^^^^^^%%' +echo. $* - allows the alias to assume all the parameters of the supplied +echo. command. +echo. $1-$9 - Allows you to seperate parameter by number, much like %%1 in +echo. batch. +echo. $T - Command seperator, allowing you to string several commands +echo. together into one alias. echo. echo. For more information, read DOSKEY /? exit /b From 5f9f3560c8cb6798230d06ca2c517ebf4b481020 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 5 May 2019 17:11:31 -0400 Subject: [PATCH 06/14] fix commnd line help --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 34ae8ed..bde41af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,13 @@ * Turn this on in existing Cmder using `clink set history_io 1` * Allow clink disable by setting CMDER_CLINK=0 before starting task +### Adds + +* Pull Request: [#2072](https://github.com/cmderdev/cmder/pull/2072) + * New alias create [alias] [alias command] syntax + * Based on [#1750](https://github.com/cmderdev/cmder/pull/1750) + * Syntax: `alias create [alias] [alias command]` + ## [1.3.11](https://github.com/cmderdev/cmder/tree/v1.3.11) (2018-12-22) ### Fixes From 5e5e0ece7364f739db5c06af2960f66a8015d1df Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 5 May 2019 17:25:47 -0400 Subject: [PATCH 07/14] CHANGELog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 34ae8ed..6b0f875 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,9 @@ * Provide default settings for Clink that updates the history file in real time * Turn this on in existing Cmder using `clink set history_io 1` * Allow clink disable by setting CMDER_CLINK=0 before starting task +* Pull Request: [#2068](https://github.com/cmderdev/cmder/pull/2068) + * Print Index in History Command Output. + * Sets default `history_expand_mode = 3` in initial Clink Settings. ## [1.3.11](https://github.com/cmderdev/cmder/tree/v1.3.11) (2018-12-22) From 893207453dd388915110150bdecea8365da392b3 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sun, 5 May 2019 17:27:25 -0400 Subject: [PATCH 08/14] CHANGELog --- vendor/init.bat | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/vendor/init.bat b/vendor/init.bat index 20676f6..5cc29ab 100644 --- a/vendor/init.bat +++ b/vendor/init.bat @@ -51,9 +51,7 @@ call "%cmder_root%\vendor\lib\lib_profile" ) else if /i "%1"=="/v" ( set verbose_output=1 ) else if /i "%1"=="/d" ( - if not defined VSCODE_CWD ( - set debug_output=1 - ) + set debug_output=1 ) else if /i "%1" == "/max_depth" ( if "%~2" geq "1" if "%~2" leq "5" ( set "max_depth=%~2" From 5def1c584ae76089fef514f60e6ddfb90b447d78 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 12 May 2019 15:18:15 +0200 Subject: [PATCH 09/14] Add FWPARS cmdline argument. This argument forwards parameters to ConEmu app. e.g. Cmder.exe /FWPARS "-min -tsa" In this case Cmder will start minimized on TaskBar --- README.md | 1 + launcher/src/CmderLauncher.cpp | 20 ++++++++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d624972..4b9940f 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,7 @@ The Cmder's user interface is also designed to be more eye pleasing, and you can | `/SINGLE` | Start Cmder in single mode. | | `/START [start_path]` | Folder path to start in. | | `/TASK [task_name]` | Task to start after launch. | +| `/FWPARS [ConEmu params]` | Forwads parameters to ConEmu | ## Context Menu Integration diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index e399a47..2490bb3 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -71,7 +71,7 @@ bool FileExists(const wchar_t * filePath) return false; } -void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstring taskName = L"", std::wstring cfgRoot = L"", bool use_user_cfg = true) +void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstring taskName = L"", std::wstring cfgRoot = L"", bool use_user_cfg = true, std::wstring pars2fw = L"") { #if USE_TASKBAR_API wchar_t appId[MAX_PATH] = { 0 }; @@ -98,6 +98,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr std::wstring cmderStart = path; std::wstring cmderTask = taskName; + std::wstring cmderPars2CEmu = pars2fw; std::copy(cfgRoot.begin(), cfgRoot.end(), userConfigDirPath); userConfigDirPath[cfgRoot.length()] = 0; @@ -391,6 +392,11 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr swprintf_s(args, L"%s -loadcfgfile \"%s\"", args, userConEmuCfgPath); } + if (!streqi(cmderPars2CEmu.c_str(), L"")) + { + swprintf_s(args, L"%s %s", args, cmderPars2CEmu.c_str()); + } + SetEnvironmentVariable(L"CMDER_ROOT", exeDir); if (wcscmp(userConfigDirPath, configDirPath) != 0) { @@ -527,6 +533,7 @@ struct cmderOptions std::wstring cmderStart = L""; std::wstring cmderTask = L""; std::wstring cmderRegScope = L"USER"; + std::wstring cmderPars2CEmu = L""; bool cmderSingle = false; bool cmderUserCfg = true; bool registerApp = false; @@ -620,6 +627,11 @@ cmderOptions GetOption() } } } + else if (_wcsicmp(L"/fwpars", szArgList[i]) == 0) + { + cmderOptions.cmderPars2CEmu = szArgList[i + 1]; + i++; + } else if (cmderOptions.cmderStart == L"") { int len = wcslen(szArgList[i]); @@ -635,13 +647,13 @@ cmderOptions GetOption() } else { - MessageBox(NULL, L"Unrecognized parameter.\n\nValid options:\n\n /c [CMDER User Root Path]\n\n /task [ConEmu Task Name]\n\n [/start [Start in Path] | [Start in Path]]\n\n /single\n\n /m\n\nor\n\n /register [USER | ALL]\n\nor\n\n /unregister [USER | ALL]\n", MB_TITLE, MB_OK); + MessageBox(NULL, L"Unrecognized parameter.\n\nValid options:\n\n /c [CMDER User Root Path]\n\n /task [ConEmu Task Name]\n\n [/start [Start in Path] | [Start in Path]]\n\n /single\n\n /m\n\n /fwpars [ConEmu parameters to fw]\n\nor\n\n /register [USER | ALL]\n\nor\n\n /unregister [USER | ALL]\n", MB_TITLE, MB_OK); cmderOptions.error = true; } } else { - MessageBox(NULL, L"Unrecognized parameter.\n\nValid options:\n\n /c [CMDER User Root Path]\n\n /task [ConEmu Task Name]\n\n [/start [Start in Path] | [Start in Path]]\n\n /single\n\n /m\n\nor\n\n /register [USER | ALL]\n\nor\n\n /unregister [USER | ALL]\n", MB_TITLE, MB_OK); + MessageBox(NULL, L"Unrecognized parameter.\n\nValid options:\n\n /c [CMDER User Root Path]\n\n /task [ConEmu Task Name]\n\n [/start [Start in Path] | [Start in Path]]\n\n /single\n\n /m\n\n /fwpars [ConEmu parameters to fw]\n\nor\n\n /register [USER | ALL]\n\nor\n\n /unregister [USER | ALL]\n", MB_TITLE, MB_OK); cmderOptions.error = true; } } @@ -683,7 +695,7 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, } else { - StartCmder(cmderOptions.cmderStart, cmderOptions.cmderSingle, cmderOptions.cmderTask, cmderOptions.cmderCfgRoot, cmderOptions.cmderUserCfg); + StartCmder(cmderOptions.cmderStart, cmderOptions.cmderSingle, cmderOptions.cmderTask, cmderOptions.cmderCfgRoot, cmderOptions.cmderUserCfg, cmderOptions.cmderPars2CEmu); } return 0; From efc978f6f821291f4ccb634f9b79d47147b74450 Mon Sep 17 00:00:00 2001 From: Wayne Arthurton Date: Thu, 16 May 2019 15:13:07 -0400 Subject: [PATCH 10/14] Update README.md Added /t switch for timed init mode. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index d624972..c2f97a2 100644 --- a/README.md +++ b/README.md @@ -146,6 +146,7 @@ You may find some Monokai color schemes for mintty to match Cmder [here](https:/ | `/c [user cmder root]` | Enables user bin and config folders for 'Cmder as admin' sessions due to non-shared environment. | not set | | `/d` | Enables debug output. | not set | | `/f` | Enables Cmder Fast Init Mode. This disables some features, see pull request [#1492](https://github.com/cmderdev/cmder/pull/1942) for more details. | not set | +| `/t` | Enables Cmder Timed Init Mode. This displays the time taken run init scripts | not set | | `/git_install_root [file path]` | User specified Git installation root path. | `%CMDER_ROOT%\vendor\Git-for-Windows` | | `/home [home folder]` | User specified folder path to set `%HOME%` environment variable. | `%userprofile%` | | `/max_depth [1-5]` | Define max recurse depth when adding to the path for `%cmder_root%\bin` and `%cmder_user_bin%` | 1 | From 543c7ca6e97ce6e52fb1dccb87548f751b97e8dc Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 19 May 2019 22:54:47 +0200 Subject: [PATCH 11/14] Replace /FWPARS argument with /X as "daxgames" request. --- CHANGELOG.md | 6 ++++++ README.md | 2 +- launcher/src/CmderLauncher.cpp | 21 +++++++++++---------- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f6ef29..133b1e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ ## [Unreleased] +* Question issue: [#2094](https://github.com/cmderdev/cmder/issues/2094) +* Pull Request : [#2096](https://github.com/cmderdev/cmder/pull/2096) + * New argument created to ConEmu forwarding arguments. + * Syntax: `/x [ConEmu extras arguments]` + * e.g.: `Cmder.exe /x "-min -tsa"` + ### Fixes * Pull Request: [#2002](https://github.com/cmderdev/cmder/pull/2002) diff --git a/README.md b/README.md index 4b9940f..97378b4 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ The Cmder's user interface is also designed to be more eye pleasing, and you can | `/SINGLE` | Start Cmder in single mode. | | `/START [start_path]` | Folder path to start in. | | `/TASK [task_name]` | Task to start after launch. | -| `/FWPARS [ConEmu params]` | Forwads parameters to ConEmu | +| `/X [ConEmu extras pars]` | Forwads parameters to ConEmu | ## Context Menu Integration diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index 2490bb3..de10d04 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -71,7 +71,7 @@ bool FileExists(const wchar_t * filePath) return false; } -void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstring taskName = L"", std::wstring cfgRoot = L"", bool use_user_cfg = true, std::wstring pars2fw = L"") +void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstring taskName = L"", std::wstring cfgRoot = L"", bool use_user_cfg = true, std::wstring conemu_args = L"") { #if USE_TASKBAR_API wchar_t appId[MAX_PATH] = { 0 }; @@ -98,7 +98,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr std::wstring cmderStart = path; std::wstring cmderTask = taskName; - std::wstring cmderPars2CEmu = pars2fw; + std::wstring cmderConEmuArgs = conemu_args; std::copy(cfgRoot.begin(), cfgRoot.end(), userConfigDirPath); userConfigDirPath[cfgRoot.length()] = 0; @@ -392,9 +392,9 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr swprintf_s(args, L"%s -loadcfgfile \"%s\"", args, userConEmuCfgPath); } - if (!streqi(cmderPars2CEmu.c_str(), L"")) + if (!streqi(cmderConEmuArgs.c_str(), L"")) { - swprintf_s(args, L"%s %s", args, cmderPars2CEmu.c_str()); + swprintf_s(args, L"%s %s", args, cmderConEmuArgs.c_str()); } SetEnvironmentVariable(L"CMDER_ROOT", exeDir); @@ -533,7 +533,7 @@ struct cmderOptions std::wstring cmderStart = L""; std::wstring cmderTask = L""; std::wstring cmderRegScope = L"USER"; - std::wstring cmderPars2CEmu = L""; + std::wstring cmderConEmuArgs = L""; bool cmderSingle = false; bool cmderUserCfg = true; bool registerApp = false; @@ -627,9 +627,10 @@ cmderOptions GetOption() } } } - else if (_wcsicmp(L"/fwpars", szArgList[i]) == 0) + /* Used for passing arguments to conemu prog */ + else if (_wcsicmp(L"/x", szArgList[i]) == 0) { - cmderOptions.cmderPars2CEmu = szArgList[i + 1]; + cmderOptions.cmderConEmuArgs = szArgList[i + 1]; i++; } else if (cmderOptions.cmderStart == L"") @@ -647,13 +648,13 @@ cmderOptions GetOption() } else { - MessageBox(NULL, L"Unrecognized parameter.\n\nValid options:\n\n /c [CMDER User Root Path]\n\n /task [ConEmu Task Name]\n\n [/start [Start in Path] | [Start in Path]]\n\n /single\n\n /m\n\n /fwpars [ConEmu parameters to fw]\n\nor\n\n /register [USER | ALL]\n\nor\n\n /unregister [USER | ALL]\n", MB_TITLE, MB_OK); + MessageBox(NULL, L"Unrecognized parameter.\n\nValid options:\n\n /c [CMDER User Root Path]\n\n /task [ConEmu Task Name]\n\n [/start [Start in Path] | [Start in Path]]\n\n /single\n\n /m\n\n /x [ConEmu extra arguments]\n\nor\n\n /register [USER | ALL]\n\nor\n\n /unregister [USER | ALL]\n", MB_TITLE, MB_OK); cmderOptions.error = true; } } else { - MessageBox(NULL, L"Unrecognized parameter.\n\nValid options:\n\n /c [CMDER User Root Path]\n\n /task [ConEmu Task Name]\n\n [/start [Start in Path] | [Start in Path]]\n\n /single\n\n /m\n\n /fwpars [ConEmu parameters to fw]\n\nor\n\n /register [USER | ALL]\n\nor\n\n /unregister [USER | ALL]\n", MB_TITLE, MB_OK); + MessageBox(NULL, L"Unrecognized parameter.\n\nValid options:\n\n /c [CMDER User Root Path]\n\n /task [ConEmu Task Name]\n\n [/start [Start in Path] | [Start in Path]]\n\n /single\n\n /m\n\n /x [ConEmu extra arguments]\n\nor\n\n /register [USER | ALL]\n\nor\n\n /unregister [USER | ALL]\n", MB_TITLE, MB_OK); cmderOptions.error = true; } } @@ -695,7 +696,7 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, } else { - StartCmder(cmderOptions.cmderStart, cmderOptions.cmderSingle, cmderOptions.cmderTask, cmderOptions.cmderCfgRoot, cmderOptions.cmderUserCfg, cmderOptions.cmderPars2CEmu); + StartCmder(cmderOptions.cmderStart, cmderOptions.cmderSingle, cmderOptions.cmderTask, cmderOptions.cmderCfgRoot, cmderOptions.cmderUserCfg, cmderOptions.cmderConEmuArgs); } return 0; From a97ce1f95050a255db518e24c89810e3563719aa Mon Sep 17 00:00:00 2001 From: Martin Kemp Date: Fri, 24 May 2019 13:47:01 +0100 Subject: [PATCH 12/14] Create stale.yml --- .github/stale.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/stale.yml diff --git a/.github/stale.yml b/.github/stale.yml new file mode 100644 index 0000000..426c00a --- /dev/null +++ b/.github/stale.yml @@ -0,0 +1,18 @@ +# Number of days of inactivity before an issue becomes stale +daysUntilStale: 30 +# Number of days of inactivity before a stale issue is closed +daysUntilClose: 7 +# Issues with these labels will never be considered stale +exemptLabels: + - 📌 Pinned +# Label to use when marking an issue as stale +staleLabel: 👀 Awaiting Response +# Comment to post when marking an issue as stale. Set to `false` to disable +markComment: > + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed in a week if no further activity occurs. + Thank you for your contribution. +# Comment to post when closing a stale issue. Set to `false` to disable +closeComment: > + This issue has been automatically closed due to it not having any + activity since it was marked as stale. Thank you for your contribution. From 73c21d1a59a62c848fbcea3a46cb965d5e5e4f18 Mon Sep 17 00:00:00 2001 From: Martin Kemp Date: Fri, 24 May 2019 13:54:09 +0100 Subject: [PATCH 13/14] Wrap labels with quotes --- .github/stale.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/stale.yml b/.github/stale.yml index 426c00a..c3b0200 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -4,9 +4,9 @@ daysUntilStale: 30 daysUntilClose: 7 # Issues with these labels will never be considered stale exemptLabels: - - 📌 Pinned + - "📌 Pinned" # Label to use when marking an issue as stale -staleLabel: 👀 Awaiting Response +staleLabel: "👀 Awaiting Response" # Comment to post when marking an issue as stale. Set to `false` to disable markComment: > This issue has been automatically marked as stale because it has not had From ea531cdd444f9b97a90ffad713207e8f38fc3829 Mon Sep 17 00:00:00 2001 From: Dax T Games Date: Mon, 3 Jun 2019 06:23:00 -0400 Subject: [PATCH 14/14] Fix post-install.bat not running and deleting itself (#2106) * Fix post-install.bat not running * Changelog * Changelog --- CHANGELOG.md | 3 +++ vendor/init.bat | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 133b1e0..7543a5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ ### Fixes +* Pull Request: [#2106](https://github.com/cmderdev/cmder/pull/2106) + * Portable Git requires running `post-install.bat` which deletes itself when done. This was not happening. + * Resolves [#2105](https://github.com/cmderdev/cmder/issues/2105) * Pull Request: [#2002](https://github.com/cmderdev/cmder/pull/2002) * Updated the HG prompt code to use the '-ib' option to 'hg id' so the branch name is always available, regardless of the state of the working copy diff --git a/vendor/init.bat b/vendor/init.bat index bb089d6..d0737dd 100644 --- a/vendor/init.bat +++ b/vendor/init.bat @@ -369,9 +369,9 @@ call "%user_aliases%" :: Basically we need to execute this post-install.bat because we are :: manually extracting the archive rather than executing the 7z sfx if exist "%GIT_INSTALL_ROOT%\post-install.bat" ( - %lib_console% verbose_output "Running Git for Windows one time Post Install...." + echo Running Git for Windows one time Post Install.... pushd "%GIT_INSTALL_ROOT%\" - "%GIT_INSTALL_ROOT%\git-bash.exe" --no-needs-console --hide --no-cd --command=post-install.bat + "%GIT_INSTALL_ROOT%\git-cmd.exe" --no-needs-console --no-cd --command=post-install.bat popd )