From 187156487e075be59bd892c82652a319bf6dfda3 Mon Sep 17 00:00:00 2001 From: Kody Brown Date: Tue, 17 Mar 2015 14:39:27 -0600 Subject: [PATCH 01/41] Added code to check for the existence of a customized ini file named `ConEmu-%COMPUTERNAME%.ini`, before checking for the standard ini file `ConEmu.ini`. --- launcher/src/CmderLauncher.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index 893e33c..1aa720f 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -99,7 +99,11 @@ void StartCmder(std::wstring path, bool is_single_mode) PathRemoveFileSpec(exeDir); PathCombine(icoPath, exeDir, L"icons\\cmder.ico"); - PathCombine(cfgPath, exeDir, L"config\\ConEmu.xml"); + PathCombine(cfgPath, exeDir, L"config\\ConEmu-%COMPUTERNAME%.xml"); + ExpandEnvironmentStrings(cfgPath, cfgPath, sizeof(cfgPath) / sizeof(cfgPath[0])); + if (!PathFileExists(cfgPath)) { + PathCombine(cfgPath, exeDir, L"config\\ConEmu.xml"); + } PathCombine(conEmuPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu.exe"); if (is_single_mode) From f6a0447a9a7a7790128c7a77edbb5906fad5d349 Mon Sep 17 00:00:00 2001 From: Malobre Date: Wed, 1 Jul 2015 12:55:20 +0200 Subject: [PATCH 02/41] Add `-ExecutionPolicy Bypass` to the powershell tasks Fix issue #483 --- config/ConEmu.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/ConEmu.xml b/config/ConEmu.xml index 7ffe3ba..d7b43c8 100644 --- a/config/ConEmu.xml +++ b/config/ConEmu.xml @@ -497,7 +497,7 @@ - + @@ -507,7 +507,7 @@ - + From 3aff06521005c525a8997597579509de9c2b0bbf Mon Sep 17 00:00:00 2001 From: Thomas Chacko Date: Thu, 9 Jul 2015 11:42:53 +0530 Subject: [PATCH 03/41] Update .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index e765cea..c2dbc9d 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ Thumbs.db *.exe build/ Version v* +*.bak From 63d35a976014ecd29e6f18de1c3c7cee1440ca4f Mon Sep 17 00:00:00 2001 From: Ashutosh Das Date: Mon, 24 Aug 2015 06:38:11 +0600 Subject: [PATCH 04/41] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 81ecad7..800a761 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Latest release is **[v1.2](https://github.com/bliker/cmder/releases/tag/v1.2)** -Cmder is a **software package** created out of pure frustration over absence of usable console emulator on Windows. It is based on [ConEmu](https://code.google.com/p/conemu-maximus5/) with *major* config overhaul. Monokai color scheme, amazing [clink](https://github.com/mridgers/clink) and custom prompt layout. +Cmder is a **software package** created out of pure frustration over absence of usable console emulator on Windows. It is based on [ConEmu](https://github.com/Maximus5/ConEmu) with *major* config overhaul. Monokai color scheme, amazing [clink](https://github.com/mridgers/clink) and custom prompt layout. ![Cmder Screenshot](http://i.imgur.com/g1nNf0I.png) From 5bcddd6b44224347ac189fd8a5836fdeb4ba007a Mon Sep 17 00:00:00 2001 From: Jack Kingsman Date: Fri, 2 Oct 2015 18:58:55 -0700 Subject: [PATCH 05/41] fix typos and better phrasing --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 81ecad7..dd16930 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Cmder is a **software package** created out of pure frustration over absence of ## Why use it -The main advantage of Cmder is portability. It is designed to be totally self-contained with no external dependencies, that is makes it great for **USB Sticks** or **Dropbox**. So you can carry your console, aliases and binaries (like wget, curl and git) with you anywhere. +The main advantage of Cmder is portability. It is designed to be totally self-contained with no external dependencies, which makes it great for **USB Sticks** or **Dropbox** - you can carry your console, aliases and binaries (like wget, curl and git) with you anywhere! ## Installation @@ -23,7 +23,7 @@ The main advantage of Cmder is portability. It is designed to be totally self-co ## Integration -So you've experimented with cmder a little and want to give it a shot in a more permanent home; +So, you've experimented with cmder a little and want to give it a shot in a more permanent home: ### Shortcut to open Cmder in a chosen folder @@ -51,7 +51,7 @@ In a file explorer window right click in or on a directory to see "Cmder Here" i * `Ctrl + r` : History search * `Shift + mouse` : Select and copy text from buffer -(Some shortcuts are not yet documented, thought they exist, please add them here) +(Some shortcuts are not yet documented, thought they exist - please document them here) ## Features From 61a9b83c4295e313a004e0de006cd0e88eede99f Mon Sep 17 00:00:00 2001 From: Jack Kingsman Date: Fri, 2 Oct 2015 19:06:18 -0700 Subject: [PATCH 06/41] Make wording clearer --- config/Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/Readme.md b/config/Readme.md index 77e2326..f8dbce2 100644 --- a/config/Readme.md +++ b/config/Readme.md @@ -1,3 +1,3 @@ ## Config -All config files must be in this folder. If there is no option to set this folder directly, it has to be hardlinked. \ No newline at end of file +All config files must be in this folder. If there is no option to create or read from this folder directly, it must be hardlinked. From 0f6441a7eeb302c900487784fd3def427a303d0f Mon Sep 17 00:00:00 2001 From: Benjamin Staneck Date: Mon, 12 Oct 2015 14:30:04 +0200 Subject: [PATCH 07/41] Update README.md Update Gitter badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4633a63..8e80235 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Cmder -[![Join the chat at https://gitter.im/bliker/cmder](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/bliker/cmder?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +[![Join the chat at https://gitter.im/bliker/cmder](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/cmderdev/cmder?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) Latest release is **[v1.2](https://github.com/bliker/cmder/releases/tag/v1.2)** From 417051f49696ab6a1c5f9e240390f800669ee487 Mon Sep 17 00:00:00 2001 From: Jackbennett Date: Fri, 16 Oct 2015 13:35:34 +0100 Subject: [PATCH 08/41] Fix alt text on gitter link too --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8e80235..d055ff8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Cmder -[![Join the chat at https://gitter.im/bliker/cmder](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/cmderdev/cmder?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +[![Join the chat at https://gitter.im/cmderdev/cmder](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/cmderdev/cmder?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) Latest release is **[v1.2](https://github.com/bliker/cmder/releases/tag/v1.2)** From 4bfdf04d59dab80e1ce76d7125c546006273e188 Mon Sep 17 00:00:00 2001 From: Jan Schulz Date: Wed, 25 Nov 2015 00:11:34 +0100 Subject: [PATCH 09/41] Do not overwrite cmder.lua on update --- {config => vendor}/cmder.lua | 10 ++++++++++ vendor/init.bat | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) rename {config => vendor}/cmder.lua (92%) diff --git a/config/cmder.lua b/vendor/cmder.lua similarity index 92% rename from config/cmder.lua rename to vendor/cmder.lua index 836540d..deea404 100644 --- a/config/cmder.lua +++ b/vendor/cmder.lua @@ -189,3 +189,13 @@ for _,lua_module in ipairs(clink.find_files(completions_dir..'*.lua')) do dofile(filename) end end + +-- now do the same for all lua files in config which do not start with '_' +local user_config_dir = clink.get_env('CMDER_ROOT')..'\\config\\' +for _,lua_module in ipairs(clink.find_files(user_config_dir..'*.lua')) do + -- Skip files that starts with _. This could be useful if some files should be ignored + if not string.match(lua_module, '^_.*') then + local filename = user_config_dir..lua_module + dofile(filename) + end +end diff --git a/vendor/init.bat b/vendor/init.bat index 6f14551..36b0a50 100644 --- a/vendor/init.bat +++ b/vendor/init.bat @@ -24,7 +24,7 @@ ) :: Run clink -@"%CMDER_ROOT%\vendor\clink\clink_x%architecture%.exe" inject --quiet --profile "%CMDER_ROOT%\config" +@"%CMDER_ROOT%\vendor\clink\clink_x%architecture%.exe" inject --quiet --profile "%CMDER_ROOT%\vendor" :: Prepare for git-for-windows From 105e381e666cc9015c933b8039b5dcc95313db36 Mon Sep 17 00:00:00 2001 From: Jan Schulz Date: Wed, 25 Nov 2015 00:12:04 +0100 Subject: [PATCH 10/41] Document the files in config --- config/Readme.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/config/Readme.md b/config/Readme.md index 77e2326..de140d3 100644 --- a/config/Readme.md +++ b/config/Readme.md @@ -1,3 +1,14 @@ ## Config -All config files must be in this folder. If there is no option to set this folder directly, it has to be hardlinked. \ No newline at end of file +All config files must be in this folder. If there is no option to set this folder +directly, it has to be hardlinked. + +* `aliases`: aliases in cmd; called form vendor\init.bat; autocreated from + `vendor\aliases.example`. +* `*.lua`: clink completitions and prompt filters; called from vendor\cmder.lua after all + other prompt filter and clink completitons are initialized; add your own. +* `user_profile.{sh|bat|ps1}: startup files for bash|cmd|powershell tasks; called from their + respective startup scripts in `vendor\`; autocreated on first start of such a task +* `.history`: the current commandline history; autoupdated on close +* `settings`: settings for readline; overwritten on update +* `ConEmu.xml`: settings from ConEmu (=the UI of cmder -> Preferences); overwritten on update \ No newline at end of file From d0909f27e1c99512f2b6c72a8c92f48f86f635fe Mon Sep 17 00:00:00 2001 From: Benjamin Staneck Date: Sat, 28 Nov 2015 02:45:05 +0100 Subject: [PATCH 11/41] :arrow_up: ConEmu@151129 Changelog: http://conemu.github.io/blog/2015/11/26/Build-151126.html Skipped http://conemu.github.io/blog/2015/11/22/Build-151122.html --- vendor/sources.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vendor/sources.json b/vendor/sources.json index 258235f..0fadaee 100644 --- a/vendor/sources.json +++ b/vendor/sources.json @@ -11,8 +11,8 @@ }, { "name": "conemu-maximus5", - "version": "151119", - "url": "https://github.com/Maximus5/ConEmu/releases/download/v15.11.19/ConEmuPack.151119.7z" + "version": "151126", + "url": "https://github.com/Maximus5/ConEmu/releases/download/v15.11.26/ConEmuPack.151126.7z" }, { "name": "clink-completions", From 73f5cbdc7b01da72b4d250ed2b37ff8a4bb12885 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sat, 28 Nov 2015 11:02:44 -0600 Subject: [PATCH 12/41] README.md Updates --- README.md | 42 ++++++++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index a62c6de..51f8b3b 100644 --- a/README.md +++ b/README.md @@ -56,9 +56,16 @@ In a file explorer window right click in or on a directory to see "Cmder Here" i ### Access to multiple shells in one window using tabs You can open multiple tabs each containing one of the following shells: -* Cmder | Cmder as Admin - Enhanced Windows 'cmd.exe' shell. -* Powershell | Powershell as Admin - Enhanced Windows Powershell. -* Bash/mintty | Bash/mintty as Admin - Unix/Linux like bash shell running on Windows. +|Task|Shell|Description| +|----|-----|-----------| +|Cmder|cmd.exe|Windows 'cmd.exe' shell enhanced with Git, Git aware prompt, Clink(GNU Readline), and Aliases.| +|Cmder as Admin|cmd.exe|Administrative Windows 'cmd.exe' Cmder shell.| +|Powershell|powershell.exe|Windows Powershell enhanced with Git and Git aware prompt .| +|Powershell as Admin|powershell.exe|Administrative Windows 'powerhell.exe' Cmder shell.| +|Bash|bash.exe|Unix/Linux like bash shell running on Windows.| +|Bash as Admin|bash.exe|Administrative Unix/Linux like bash shell running on Windows.| +|Mintty|bash.exe|Unix/Linux like bash shell running on Windows. See below for Mintty configuration differences| +|Mintty as Admin|bash.exe|Administrative Unix/Linux like bash shell running on Windows. See below for Mintty configuration differences| Cmder, Powershell, and Bash tabs all run on top of the Windows Console API and work as you might expect in Cmder with access to use ConEmu's color schemes, key bindings and other settings defined in the ConEmu Settings dialog. @@ -74,30 +81,41 @@ From a bash/mintty shell: cd $CMDER_ROOT/vendor git clone https://github.com/karlin/mintty-colors-solarized.git cd mintty-colors-solarized/ -echo source \$CMDER_ROOT/vendor/mintty-colors-solarized/mintty-solarized-dark.sh>>$CMDER_ROOT/config/user-cmder.sh +echo source \$CMDER_ROOT/vendor/mintty-colors-solarized/mintty-solarized-dark.sh>>$CMDER_ROOT/config/user-profile.sh ``` ### Cmder Portable Shell User Config User specific configuration is possible using the cmder specific shell config files. Edit the below files to add your own configuration: -* Cmder - %CMDER_ROOT%\config\user-startup.cmd -* Powershell - $ENV:CMDER_ROOT\config\user-profile.ps1 -* Bash/Mintty - $CMDER_ROOT/config/user-cmder.sh +|Shell|Cmder Portable User Config| +| ------------- |:-------------:| +|Cmder|%CMDER_ROOT%\config\user-profile.cmd| +|Powershell|$ENV:CMDER_ROOT\config\user-profile.ps1| +|Bash/Mintty|$CMDER_ROOT/config/user-profile.sh| -Bash and Mintty sessions will also source the '$HOME/.bashrc' file it it exists before it sources '$CMDER_ROOT/config/user-cmder.sh'. +Note: Bash and Mintty sessions will also source the '$HOME/.bashrc' file it it exists after it sources '$CMDER_ROOT/config/user-profile.sh'. ### Aliases -You can define simple aliases with command `alias name=command`. +#### Cmder(Cmd.exe) Aliases +You can define simple aliases for `cmd.exe` sessions with a command like `alias name=command`. Cmd.exe aliases support optional parameters through the `$1-9` or the `$*` special characters so the alias `vi=vim.exe $*` typed as `vi [filename]` will open `[filename]` in `vim.exe`. -For example there is one defined for you `alias e.=explorer .` +Cmd.exe aliases can also be more complex. See: [DOSKEY.EXE documentation](http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/doskey.mspx?mfr=true) for additional details on complex aliases/macros for 'cmd.exe' -All aliases will be saved in `/config/aliases` file +Aliases defined using the `alias.bat` command will automatically be saved in the `%CMDER_ROOT%\config\aliases` file + +#### Bash.exe|Mintty.exe Aliases +Bash shells support simple and complex aliases with optional parameters natively so they work a little different. Typing `alias name=command` will create an alias only for the current running session. To make an alias permanent add it to either your `$CMDER_ROOT/config/user-profile.sh` or your `$HOME/.bashrc`. + +If you add bash aliases to `$CMDER_ROOT/config/user-profile.sh` they will portable and follow your Cmder folder if you copy it to another machine. `$HOME/.bashrc` defined aliases are not portable. + +#### Powershell.exe Aliases +Powershell has native simple alias support, for example `[new-alias | set-alias] alias command`, so complex aliases with optional parameters are not supported in Powershell sessions. Type `get-help [new-alias|set-alias] -full` for help on Powershell aliases. ### SSH Agent To start SSH agent simply call `start-ssh-agent`, which is in the `vendor/git-for-windows/cmd` folder. -If you want to run SSH agent on startup, include the line `@call "%GIT_INSTALL_ROOT%/cmd/start-ssh-agent.cmd"` in `/config/user-startup.bat` (usually just uncomment it). +If you want to run SSH agent on startup, include the line `@call "%GIT_INSTALL_ROOT%/cmd/start-ssh-agent.cmd"` in `%CMDER_ROOT%/config/user-profile.cmd` (usually just uncomment it). ## Todo From 567889e69fb00d7a3f7f661b8552916cb7e03a3d Mon Sep 17 00:00:00 2001 From: Jan Schulz Date: Fri, 4 Dec 2015 19:57:08 +0100 Subject: [PATCH 13/41] Fix: don't garble the input line for long lines in git projects If having a long line of input in histroy, which went on into the second row and using to get back to it, you got the effect that the input was split over three lines: "text, empty, text", but using the arrows do move to the front of the first line was moving the cursor in the second (empty) row. You could change the text, but you needed to do it "in the dark". No idea why s/os.execute/is.popen/ fixes this, but it does. Partly adresses https://github.com/cmderdev/cmder/issues/749 --- vendor/cmder.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/cmder.lua b/vendor/cmder.lua index deea404..0579050 100644 --- a/vendor/cmder.lua +++ b/vendor/cmder.lua @@ -142,7 +142,7 @@ end -- @return {bool} --- function get_git_status() - return os.execute("git diff --quiet --ignore-submodules HEAD 2>nul") + return io.popen("git diff --quiet --ignore-submodules HEAD 2>nul") end function git_prompt_filter() From 5f68e4e9872128a9e21d7ccc592bdf774500c671 Mon Sep 17 00:00:00 2001 From: Vladimir Kotikov Date: Thu, 10 Dec 2015 22:09:12 +0300 Subject: [PATCH 14/41] :arrow_up: Bump clink-completions to 0.2.2 --- vendor/sources.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vendor/sources.json b/vendor/sources.json index 0fadaee..bd44149 100644 --- a/vendor/sources.json +++ b/vendor/sources.json @@ -16,7 +16,7 @@ }, { "name": "clink-completions", - "version": "0.2.1", - "url": "https://github.com/vladimir-kotikov/clink-completions/archive/0.2.1.zip" + "version": "0.2.2", + "url": "https://github.com/vladimir-kotikov/clink-completions/archive/0.2.2.zip" } ] From 41836e669b158c5d11cc6357456f69b80867d108 Mon Sep 17 00:00:00 2001 From: Benjamin Staneck Date: Fri, 11 Dec 2015 18:48:27 +0100 Subject: [PATCH 15/41] :arrow_up: ConEmu@151210 Changelog: https://conemu.github.io/blog/2015/12/10/Build-151210.html Skipped: * https://conemu.github.io/blog/2015/12/08/Build-151208.html * https://conemu.github.io/blog/2015/12/07/Build-151207.html * https://conemu.github.io/blog/2015/12/05/Build-151205.html * https://conemu.github.io/blog/2015/12/02/Build-151202.html * https://conemu.github.io/blog/2015/11/29/Build-151129.html --- vendor/sources.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vendor/sources.json b/vendor/sources.json index bd44149..62bc8d7 100644 --- a/vendor/sources.json +++ b/vendor/sources.json @@ -11,8 +11,8 @@ }, { "name": "conemu-maximus5", - "version": "151126", - "url": "https://github.com/Maximus5/ConEmu/releases/download/v15.11.26/ConEmuPack.151126.7z" + "version": "151210", + "url": "https://github.com/Maximus5/ConEmu/releases/download/v15.12.10/ConEmuPack.151210.7z" }, { "name": "clink-completions", From 6879a94c1056df9c5af47636c3a1360f3bf5efce Mon Sep 17 00:00:00 2001 From: Gregory Lureau Date: Tue, 15 Dec 2015 18:56:22 +0100 Subject: [PATCH 16/41] Fix vendor/init.bat when the PATH contains spaces. --- vendor/init.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/init.bat b/vendor/init.bat index 4364300..c03a7a6 100644 --- a/vendor/init.bat +++ b/vendor/init.bat @@ -51,7 +51,7 @@ ) :: Enhance Path -@set PATH=%CMDER_ROOT%\bin;%PATH%;%CMDER_ROOT%\ +@set "PATH=%CMDER_ROOT%\bin;%PATH%;%CMDER_ROOT%\" :: make sure we have an example file From add52c0ee6cef7517788a36e503f1091d02dc435 Mon Sep 17 00:00:00 2001 From: Benjamin Staneck Date: Wed, 16 Dec 2015 06:13:53 +0100 Subject: [PATCH 17/41] :arrow_up: Git for Windows@2.6.4 Changelog: https://github.com/git-for-windows/git/releases/tag/v2.6.4.windows.1 --- vendor/sources.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vendor/sources.json b/vendor/sources.json index 62bc8d7..f4e374f 100644 --- a/vendor/sources.json +++ b/vendor/sources.json @@ -1,8 +1,8 @@ [ { "name": "git-for-windows", - "version": "v2.6.3.windows.1", - "url": "https://github.com/git-for-windows/git/releases/download/v2.6.3.windows.1/PortableGit-2.6.3-32-bit.7z.exe" + "version": "v2.6.4.windows.1", + "url": "https://github.com/git-for-windows/git/releases/download/v2.6.4.windows.1/PortableGit-2.6.4-32-bit.7z.exe" }, { "name": "clink", From 1389fe0c4d81512215880037e9281bac6df3492b Mon Sep 17 00:00:00 2001 From: Vladimir Kotikov Date: Tue, 29 Dec 2015 00:23:30 +0300 Subject: [PATCH 18/41] :arrow_up: Bump clink to 0.4.6 --- vendor/sources.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vendor/sources.json b/vendor/sources.json index f4e374f..8a7850c 100644 --- a/vendor/sources.json +++ b/vendor/sources.json @@ -6,8 +6,8 @@ }, { "name": "clink", - "version": "0.4.5", - "url": "https://github.com/mridgers/clink/releases/download/0.4.5/clink_0.4.5.zip" + "version": "0.4.6", + "url": "https://github.com/mridgers/clink/releases/download/0.4.6/clink_0.4.6.zip" }, { "name": "conemu-maximus5", From c77641cf035ec033add13e56a2081c0eb3ecd835 Mon Sep 17 00:00:00 2001 From: Benjamin Staneck Date: Thu, 7 Jan 2016 01:50:52 +0100 Subject: [PATCH 19/41] :arrow_up: Git@2.7.0.windows1 Changelog: https://github.com/git-for-windows/git/releases/tag/v2.7.0.windows.1 --- vendor/sources.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vendor/sources.json b/vendor/sources.json index 8a7850c..eef2624 100644 --- a/vendor/sources.json +++ b/vendor/sources.json @@ -1,8 +1,8 @@ [ { "name": "git-for-windows", - "version": "v2.6.4.windows.1", - "url": "https://github.com/git-for-windows/git/releases/download/v2.6.4.windows.1/PortableGit-2.6.4-32-bit.7z.exe" + "version": "v2.7.0.windows.1", + "url": "https://github.com/git-for-windows/git/releases/download/v2.7.0.windows.1/PortableGit-2.7.0-32-bit.7z.exe" }, { "name": "clink", From 2c0c6ed416738be76af70c978b8866493087f6ca Mon Sep 17 00:00:00 2001 From: Jan Schulz Date: Mon, 11 Jan 2016 22:09:23 +0100 Subject: [PATCH 20/41] Make "cmder here" work again The new system works by setting "CMDER_START" if a cmder.exe gets a startup path. The rest is then implemented in the profile.ps1 and init.bat. The new system works as follows: 1.If a startup path is given, cmder.exe sets this as `CMDER_START` and the startup scripts change to that directory. 2.If the usere sets a `CMDER_START` environment variable and this is not overwritten by cmder.exe, this variable is taken as the startup directory by the startup scripts. 3.If not such path is give, the conemu startup dirs is the winner, as the startup scripts don't change anything. --- launcher/src/CmderLauncher.cpp | 14 ++++++-------- vendor/init.bat | 8 +++----- vendor/profile.ps1 | 29 +++++------------------------ 3 files changed, 14 insertions(+), 37 deletions(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index 330ced5..a29617e 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -63,10 +63,12 @@ optpair GetOption() if (argc == 1) { + // no commandline argument... pair = optpair(L"/START", L""); } else if (argc == 2 && argv[1][0] != L'/') { + // only a single argument: this should be a path... pair = optpair(L"/START", argv[1]); } else @@ -152,7 +154,10 @@ void StartCmder(std::wstring path, bool is_single_mode) } SetEnvironmentVariable(L"CMDER_ROOT", exeDir); - //SetEnvironmentVariable(L"CMDER_START", path.c_str()); + if (!streqi(path.c_str(), L"")) + { + SetEnvironmentVariable(L"CMDER_START", path.c_str()); + } // Send out the Settings Changed message - Once using ANSII... //SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM)"Environment", SMTO_ABORTIFHUNG, 5000, NULL); @@ -160,13 +165,6 @@ void StartCmder(std::wstring path, bool is_single_mode) // ...and once using UniCode (because Windows 8 likes it that way). //SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM) L"Environment", SMTO_ABORTIFHUNG, 5000, NULL); - HKEY cmderStartRegistryKey; - if (RegCreateKeyEx(HKEY_CURRENT_USER, L"Software\\cmder", 0, NULL, 0, KEY_ALL_ACCESS, NULL, &cmderStartRegistryKey, 0) == ERROR_SUCCESS) - { - RegSetValueEx(cmderStartRegistryKey, L"CMDER_START", 0, REG_SZ, (const BYTE*) path.c_str(), path.size() * 2); - RegCloseKey(cmderStartRegistryKey); - } - STARTUPINFO si = { 0 }; si.cb = sizeof(STARTUPINFO); #if USE_TASKBAR_API diff --git a/vendor/init.bat b/vendor/init.bat index c03a7a6..ffb4881 100644 --- a/vendor/init.bat +++ b/vendor/init.bat @@ -58,7 +58,7 @@ @if not exist "%CMDER_ROOT%\config\aliases" ( echo Creating intial aliases in %CMDER_ROOT%\config\aliases copy "%CMDER_ROOT%\vendor\aliases.example" "%CMDER_ROOT%\config\aliases" > null -) +) :: Add aliases @doskey /macrofile="%CMDER_ROOT%\config\aliases" @@ -76,12 +76,10 @@ :: Set home path @if not defined HOME set HOME=%USERPROFILE% +:: This is either a env variable set by the user or the result of +:: cmder.exe setting this variable due to a commandline argument or a "cmder here" @if defined CMDER_START ( @cd /d "%CMDER_START%" -) else ( - @if "%CD%\" == "%CMDER_ROOT%\" ( - @cd /d "%HOME%" - ) ) @if exist "%CMDER_ROOT%\config\user-profile.cmd" ( diff --git a/vendor/profile.ps1 b/vendor/profile.ps1 index 54f929b..6ed8a04 100644 --- a/vendor/profile.ps1 +++ b/vendor/profile.ps1 @@ -32,7 +32,7 @@ try { # $env:Path += $(";" + $env:CMDER_ROOT + "\vendor\git-for-windows\usr\bin") # set-alias -name "vi" -value "vim" # # I think the below is safer. - + new-alias -name "vim" -value $($ENV:CMDER_ROOT + "\vendor\git-for-windows\usr\bin\vim.exe") new-alias -name "vi" -value vim } @@ -82,34 +82,15 @@ if ($gitStatus) { } # Move to the wanted location -$cmderStartKey = 'HKCU:\Software\cmder' -$cmderStartSubKey = 'CMDER_START' - -$cmderStart = (Get-Item -Path $cmderStartKey -ErrorAction SilentlyContinue) - -if ( $cmderStart ) { - $cmderStart = $cmderStart.GetValue($cmderStartSubKey) - $cmderStart = ($cmderStart).Trim('"').Trim("'") - if ( $cmderStart.EndsWith(':') ) { - $cmderStart += '\' - } - - if ( ( Get-Item $cmderStart -Force ) -is [System.IO.FileInfo] ) { - $cmderStart = Split-Path $cmderStart - } - - Set-Location -Path "${cmderStart}" - - Set-ItemProperty -Path $cmderStartKey -Name $cmderStartSubKey -Value $null -} else { - Set-Location -Path "${env:HOME}" +# This is either a env variable set by the user or the result of +# cmder.exe setting this variable due to a commandline argument or a "cmder here" +if ( $ENV:CMDER_START ) { + Set-Location -Path "$ENV:CMDER_START" } - # Enhance Path $env:Path = "$Env:CMDER_ROOT\bin;$env:Path;$Env:CMDER_ROOT" - $CmderUserProfilePath = Join-Path $env:CMDER_ROOT "config\user-profile.ps1" if(Test-Path $CmderUserProfilePath) { # Create this file and place your own command in there. From 724b9a25da788ae0074d8b16bfd98fd10f0e783b Mon Sep 17 00:00:00 2001 From: Benjamin Staneck Date: Fri, 15 Jan 2016 00:16:18 +0100 Subject: [PATCH 21/41] :arrow_up: Bump clink to 0.4.7 --- vendor/sources.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vendor/sources.json b/vendor/sources.json index eef2624..f84387f 100644 --- a/vendor/sources.json +++ b/vendor/sources.json @@ -6,8 +6,8 @@ }, { "name": "clink", - "version": "0.4.6", - "url": "https://github.com/mridgers/clink/releases/download/0.4.6/clink_0.4.6.zip" + "version": "0.4.7", + "url": "https://github.com/mridgers/clink/releases/download/0.4.7/clink_0.4.7.zip" }, { "name": "conemu-maximus5", From 4dc1249881f5ad3e2c5c64f685e7a9320f3840fc Mon Sep 17 00:00:00 2001 From: Martin Kemp Date: Fri, 15 Jan 2016 11:47:54 +0000 Subject: [PATCH 22/41] Set tasks to always user CMDER_START CMDER_START should always be set as a result of either: 1. The user passes a directory to cmder.exe using `/START $DIR` - or - 2. Sets CMDER_START as a default environment variable. Fixes #772 --- config/ConEmu.xml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/config/ConEmu.xml b/config/ConEmu.xml index ae1fd5d..979a469 100644 --- a/config/ConEmu.xml +++ b/config/ConEmu.xml @@ -488,7 +488,7 @@ - + @@ -497,7 +497,7 @@ - + @@ -507,7 +507,7 @@ - + @@ -516,7 +516,7 @@ - + @@ -527,7 +527,7 @@ - + @@ -536,10 +536,10 @@ - + - + @@ -548,14 +548,14 @@ - + - + From 9c7a0379485946e120db841ed10d75c578a5224b Mon Sep 17 00:00:00 2001 From: Martin Kemp Date: Fri, 15 Jan 2016 12:10:24 +0000 Subject: [PATCH 23/41] Set CMDER_START to USER_PROFILE if no path given. --- launcher/src/CmderLauncher.cpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index a29617e..bf616ad 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -153,17 +153,15 @@ void StartCmder(std::wstring path, bool is_single_mode) swprintf_s(args, L"/Icon \"%s\" /Title Cmder", icoPath); } - SetEnvironmentVariable(L"CMDER_ROOT", exeDir); - if (!streqi(path.c_str(), L"")) - { - SetEnvironmentVariable(L"CMDER_START", path.c_str()); - } - - // Send out the Settings Changed message - Once using ANSII... - //SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM)"Environment", SMTO_ABORTIFHUNG, 5000, NULL); - - // ...and once using UniCode (because Windows 8 likes it that way). - //SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM) L"Environment", SMTO_ABORTIFHUNG, 5000, NULL); + SetEnvironmentVariable(L"CMDER_ROOT", exeDir); + if (!streqi(path.c_str(), L"")) + { + SetEnvironmentVariable(L"CMDER_START", path.c_str()); + } + else + { + SetEnvironmentVariable(L"CMDER_START", GetEnvironmentVariable(L"USER_PROFILE")); + } STARTUPINFO si = { 0 }; si.cb = sizeof(STARTUPINFO); From e7243efce274436a9544290048fe9d6823662115 Mon Sep 17 00:00:00 2001 From: Martin Kemp Date: Fri, 15 Jan 2016 12:28:24 +0000 Subject: [PATCH 24/41] Fix build script not exiting on msbuild failure. --- scripts/build.ps1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/build.ps1 b/scripts/build.ps1 index 998c442..473cfbe 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -105,6 +105,9 @@ Pop-Location if($Compile) { Push-Location -Path $launcher msbuild CmderLauncher.vcxproj /p:configuration=Release + if ($LastExitCode -ne 0) { + throw "msbuild failed to build the executable." + } Pop-Location } else { Write-Warning "You are not building a launcher, Use -Compile" From df7a6629659ece3c9af23ef8076f964e9a49c866 Mon Sep 17 00:00:00 2001 From: Martin Kemp Date: Fri, 15 Jan 2016 12:44:10 +0000 Subject: [PATCH 25/41] Get the environment variable correctly. --- launcher/src/CmderLauncher.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index bf616ad..eeff868 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -160,7 +160,9 @@ void StartCmder(std::wstring path, bool is_single_mode) } else { - SetEnvironmentVariable(L"CMDER_START", GetEnvironmentVariable(L"USER_PROFILE")); + static char buff[MAX_PATH]; + GetEnvironmentVariable(L"USER_PROFILE", buff, MAX_PATH); + SetEnvironmentVariable(L"CMDER_START", buff); } STARTUPINFO si = { 0 }; From fabcd468a797937a670c906b4e78442c9374529e Mon Sep 17 00:00:00 2001 From: Martin Kemp Date: Fri, 15 Jan 2016 13:01:55 +0000 Subject: [PATCH 26/41] Use the correct type and initialise it. --- launcher/src/CmderLauncher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index eeff868..be99de7 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -160,7 +160,7 @@ void StartCmder(std::wstring path, bool is_single_mode) } else { - static char buff[MAX_PATH]; + static wchar_t buff[MAX_PATH] = { 0 }; GetEnvironmentVariable(L"USER_PROFILE", buff, MAX_PATH); SetEnvironmentVariable(L"CMDER_START", buff); } From 73e1eb2a8bea93d4759f07cbb3a3145203c682fe Mon Sep 17 00:00:00 2001 From: Martin Kemp Date: Fri, 15 Jan 2016 13:13:16 +0000 Subject: [PATCH 27/41] Ensure Environment Variables are propagated. --- launcher/src/CmderLauncher.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index be99de7..6ac22e5 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -164,6 +164,10 @@ void StartCmder(std::wstring path, bool is_single_mode) GetEnvironmentVariable(L"USER_PROFILE", buff, MAX_PATH); SetEnvironmentVariable(L"CMDER_START", buff); } + + // Ensure EnvironmentVariables are propagated. + SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM)"Environment", SMTO_ABORTIFHUNG, 5000, NULL); + SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM) L"Environment", SMTO_ABORTIFHUNG, 5000, NULL); // For Windows >= 8 STARTUPINFO si = { 0 }; si.cb = sizeof(STARTUPINFO); From 788b5262b4d71e1643f328a5eb84912453844b2a Mon Sep 17 00:00:00 2001 From: Jan Schulz Date: Sat, 9 Jan 2016 12:43:52 +0100 Subject: [PATCH 28/41] Reorganize how clink settings are loaded 4bfdf04d59dab80e1ce76d7125c546006273e188 moved all clink config files to vendor/ and therefore the files in config/ were not used and .history was also moved to vendor/. The new arrangement uses `--script` to load our own clink.lua file which in turn as the first thing loads the original clink.lua file. The user defined files are again in config/. As clink regenerates these files, if they are not present, this also means that we don't need to include the settings file in the git repo and therefore don't overwrite it on updates. --- config/settings | 43 --------------------------------- vendor/{cmder.lua => clink.lua} | 17 ++++++------- vendor/init.bat | 8 +++++- 3 files changed, 15 insertions(+), 53 deletions(-) delete mode 100644 config/settings rename vendor/{cmder.lua => clink.lua} (92%) diff --git a/config/settings b/config/settings deleted file mode 100644 index ea1bd7e..0000000 --- a/config/settings +++ /dev/null @@ -1,43 +0,0 @@ -# name: Ctrl-D exits -# type: bool -# Ctrl-D exits the process when it is pressed on an empty line. -ctrld_exits = 1 - -# name: Ctrl-C raises exception -# type: bool -# When Ctrl-C is pressed Clink will pass it thourgh to the parent by raising the -# appropriate exception. -passthrough_ctrlc = 1 - -# name: Esc clears line -# type: bool -# Clink clears the current line when Esc is pressed (unless Readline's Vi mode -# is enabled). -esc_clears_line = 1 - -# name: Match display colour -# type: int -# Colour to use when displaying matches. A value less than 0 will be the -# opposite brightness of the default colour. -match_colour = -1 - -# name: Executable match style -# type: enum -# Changes how Clink will match executables when there is no path separator on -# the line. 0 = PATH only, 1 = PATH and CWD, 2 = PATH, CWD, and directories. In -# all cases both executables and directories are matched when there is a path -# separator present. -exec_match_style = 2 - -# name: Prompt colour -# type: int -# Surrounds the prompt in ANSI escape codes to set the prompt's colour. Disabled -# when the value is less than 0. -prompt_colour = -1 - -# name: Auto-answer terminate prompt -# type: enum -# Automatically answers cmd.exe's 'Terminate batch job (Y/N)?' prompts. 0 = -# disabled, 1 = answer 'Y', 2 = answer 'N'. -terminate_autoanswer = 0 - diff --git a/vendor/cmder.lua b/vendor/clink.lua similarity index 92% rename from vendor/cmder.lua rename to vendor/clink.lua index 0579050..f993702 100644 --- a/vendor/cmder.lua +++ b/vendor/clink.lua @@ -1,3 +1,11 @@ +-- At first, load the original clink.lua file +-- this is needed as we set the script path to this dir and therefore the original +-- clink.lua is not loaded. +local clink_lua_file = clink.get_env('CMDER_ROOT')..'\\vendor\\clink\\clink.lua' +dofile(clink_lua_file) + +-- now add our own things... + function lambda_prompt_filter() clink.prompt.value = string.gsub(clink.prompt.value, "{lamb}", "λ") end @@ -190,12 +198,3 @@ for _,lua_module in ipairs(clink.find_files(completions_dir..'*.lua')) do end end --- now do the same for all lua files in config which do not start with '_' -local user_config_dir = clink.get_env('CMDER_ROOT')..'\\config\\' -for _,lua_module in ipairs(clink.find_files(user_config_dir..'*.lua')) do - -- Skip files that starts with _. This could be useful if some files should be ignored - if not string.match(lua_module, '^_.*') then - local filename = user_config_dir..lua_module - dofile(filename) - end -end diff --git a/vendor/init.bat b/vendor/init.bat index ffb4881..89e27c0 100644 --- a/vendor/init.bat +++ b/vendor/init.bat @@ -23,8 +23,14 @@ set architecture=64 ) +:: Tell the user about the clink config files... +@if not exist "%CMDER_ROOT%\config\settings" ( + echo Generating clink initial settings in %CMDER_ROOT%\config\settings + echo Additional *.lua files in %CMDER_ROOT%\config are loaded on startup. +) + :: Run clink -@"%CMDER_ROOT%\vendor\clink\clink_x%architecture%.exe" inject --quiet --profile "%CMDER_ROOT%\vendor" +@"%CMDER_ROOT%\vendor\clink\clink_x%architecture%.exe" inject --quiet --profile "%CMDER_ROOT%\config" --scripts "%CMDER_ROOT%\vendor" :: Prepare for git-for-windows From fe45b186e0fec48181ad078f98c1a3d8e5086255 Mon Sep 17 00:00:00 2001 From: Jan Schulz Date: Fri, 15 Jan 2016 18:06:35 +0100 Subject: [PATCH 29/41] clink.lua: add header Introduce a header like in the rest of the scripts that this file is overwritten on updates and should not be modified. --- vendor/clink.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vendor/clink.lua b/vendor/clink.lua index f993702..fed2baf 100644 --- a/vendor/clink.lua +++ b/vendor/clink.lua @@ -1,3 +1,9 @@ +-- default script for clink, called by init.bat when injecting clink + +-- !!! THIS FILE IS OVERWRITTEN WHEN CMDER IS UPDATED +-- !!! Use "%CMDER_ROOT%\config\.lua" to add your lua startup scripts + + -- At first, load the original clink.lua file -- this is needed as we set the script path to this dir and therefore the original -- clink.lua is not loaded. From c055ce1c13ac25565673b81a8fdb44172b059fa8 Mon Sep 17 00:00:00 2001 From: Martin Kemp Date: Sun, 31 Jan 2016 21:35:57 +0000 Subject: [PATCH 30/41] Get USER_PROFILE differently USER_PROFILE is a known folder, so use that functionality to get it. --- launcher/src/CmderLauncher.cpp | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index 6ac22e5..510d8ad 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -3,6 +3,8 @@ #include #include "resource.h" #include +#include + #pragma comment(lib, "Shlwapi.lib") @@ -156,13 +158,18 @@ void StartCmder(std::wstring path, bool is_single_mode) SetEnvironmentVariable(L"CMDER_ROOT", exeDir); if (!streqi(path.c_str(), L"")) { - SetEnvironmentVariable(L"CMDER_START", path.c_str()); + if (!SetEnvironmentVariable(L"CMDER_START", path.c_str())) { + MessageBox(NULL, _T("Error trying to set CMDER_START to given path!"), _T("Error"), MB_OK); + } } else { - static wchar_t buff[MAX_PATH] = { 0 }; - GetEnvironmentVariable(L"USER_PROFILE", buff, MAX_PATH); - SetEnvironmentVariable(L"CMDER_START", buff); + wchar_t* homeProfile = 0; + SHGetKnownFolderPath(FOLDERID_Profile, 0, NULL, &homeProfile); + if (!SetEnvironmentVariable(L"CMDER_START", homeProfile)) { + MessageBox(NULL, _T("Error trying to set CMDER_START to USER_PROFILE!"), _T("Error"), MB_OK); + } + CoTaskMemFree(static_cast(homeProfile)); } // Ensure EnvironmentVariables are propagated. @@ -177,8 +184,10 @@ void StartCmder(std::wstring path, bool is_single_mode) #endif PROCESS_INFORMATION pi; - - CreateProcess(conEmuPath, args, NULL, NULL, false, 0, NULL, NULL, &si, &pi); + if (!CreateProcess(conEmuPath, args, NULL, NULL, false, 0, NULL, NULL, &si, &pi)) { + MessageBox(NULL, _T("Unable to create the ConEmu Process!"), _T("Error"), MB_OK); + return; + } } bool IsUserOnly(std::wstring opt) From 07b426355eb650057f0daee081304f3931ebf432 Mon Sep 17 00:00:00 2001 From: Benjamin Staneck Date: Wed, 3 Feb 2016 03:13:43 +0100 Subject: [PATCH 31/41] :arrow_up: Git@2.7.0.windows.2 Changelog: https://github.com/git-for-windows/git/releases/tag/v2.7.0.windows.2 --- vendor/sources.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vendor/sources.json b/vendor/sources.json index f84387f..4ab95db 100644 --- a/vendor/sources.json +++ b/vendor/sources.json @@ -1,8 +1,8 @@ [ { "name": "git-for-windows", - "version": "v2.7.0.windows.1", - "url": "https://github.com/git-for-windows/git/releases/download/v2.7.0.windows.1/PortableGit-2.7.0-32-bit.7z.exe" + "version": "v2.7.0.windows.2", + "url": "https://github.com/git-for-windows/git/releases/download/v2.7.0.windows.2/PortableGit-2.7.0.2-32-bit.7z.exe" }, { "name": "clink", From fccba9269ddc286a2d272ecd6ea30a61b52000d8 Mon Sep 17 00:00:00 2001 From: Benjamin Staneck Date: Wed, 3 Feb 2016 03:15:56 +0100 Subject: [PATCH 32/41] :arrow_up: ConEmu@160202 Changelog: https://conemu.github.io/en/Whats_New.html --- vendor/sources.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vendor/sources.json b/vendor/sources.json index 4ab95db..23c56e4 100644 --- a/vendor/sources.json +++ b/vendor/sources.json @@ -11,8 +11,8 @@ }, { "name": "conemu-maximus5", - "version": "151210", - "url": "https://github.com/Maximus5/ConEmu/releases/download/v15.12.10/ConEmuPack.151210.7z" + "version": "160202", + "url": "https://github.com/Maximus5/ConEmu/releases/download/v16.02.02/ConEmuPack.160202.7z" }, { "name": "clink-completions", From 6bb07d9b196623a2472427b63fd027e900a4f0b2 Mon Sep 17 00:00:00 2001 From: Martin Kemp Date: Mon, 8 Feb 2016 18:19:58 +0000 Subject: [PATCH 33/41] Revert "Set tasks to always user CMDER_START" This reverts commit 4dc1249881f5ad3e2c5c64f685e7a9320f3840fc. --- config/ConEmu.xml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/config/ConEmu.xml b/config/ConEmu.xml index 979a469..ae1fd5d 100644 --- a/config/ConEmu.xml +++ b/config/ConEmu.xml @@ -488,7 +488,7 @@ - + @@ -497,7 +497,7 @@ - + @@ -507,7 +507,7 @@ - + @@ -516,7 +516,7 @@ - + @@ -527,7 +527,7 @@ - + @@ -536,10 +536,10 @@ - + - + @@ -548,14 +548,14 @@ - + - + From 97cae2bdc7970558708903851a25d14bc82442f1 Mon Sep 17 00:00:00 2001 From: Martin Kemp Date: Mon, 8 Feb 2016 18:26:57 +0000 Subject: [PATCH 34/41] Bring variable into line --- config/ConEmu.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/ConEmu.xml b/config/ConEmu.xml index ae1fd5d..bd520e2 100644 --- a/config/ConEmu.xml +++ b/config/ConEmu.xml @@ -527,7 +527,7 @@ - + From fab895bd9b523d9bdd371e6d40b3cd4a2fc99dbd Mon Sep 17 00:00:00 2001 From: Martin Kemp Date: Mon, 8 Feb 2016 22:09:35 +0000 Subject: [PATCH 35/41] Undo. --- launcher/src/CmderLauncher.cpp | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index 510d8ad..b2b0ffa 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -3,7 +3,6 @@ #include #include "resource.h" #include -#include #pragma comment(lib, "Shlwapi.lib") @@ -162,16 +161,6 @@ void StartCmder(std::wstring path, bool is_single_mode) MessageBox(NULL, _T("Error trying to set CMDER_START to given path!"), _T("Error"), MB_OK); } } - else - { - wchar_t* homeProfile = 0; - SHGetKnownFolderPath(FOLDERID_Profile, 0, NULL, &homeProfile); - if (!SetEnvironmentVariable(L"CMDER_START", homeProfile)) { - MessageBox(NULL, _T("Error trying to set CMDER_START to USER_PROFILE!"), _T("Error"), MB_OK); - } - CoTaskMemFree(static_cast(homeProfile)); - } - // Ensure EnvironmentVariables are propagated. SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM)"Environment", SMTO_ABORTIFHUNG, 5000, NULL); SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM) L"Environment", SMTO_ABORTIFHUNG, 5000, NULL); // For Windows >= 8 From 95f6096a452abeec4b72bcc24ba514ce15a2b493 Mon Sep 17 00:00:00 2001 From: Martin Kemp Date: Mon, 8 Feb 2016 22:14:04 +0000 Subject: [PATCH 36/41] Latest 3rd party updates. --- vendor/sources.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vendor/sources.json b/vendor/sources.json index 23c56e4..e592752 100644 --- a/vendor/sources.json +++ b/vendor/sources.json @@ -1,8 +1,8 @@ [ { "name": "git-for-windows", - "version": "v2.7.0.windows.2", - "url": "https://github.com/git-for-windows/git/releases/download/v2.7.0.windows.2/PortableGit-2.7.0.2-32-bit.7z.exe" + "version": "v2.7.1.windows.1", + "url": "https://github.com/git-for-windows/git/releases/download/v2.7.1.windows.1/PortableGit-2.7.1-32-bit.7z.exe" }, { "name": "clink", @@ -11,8 +11,8 @@ }, { "name": "conemu-maximus5", - "version": "160202", - "url": "https://github.com/Maximus5/ConEmu/releases/download/v16.02.02/ConEmuPack.160202.7z" + "version": "160207", + "url": "https://github.com/Maximus5/ConEmu/releases/download/v16.02.07/ConEmuPack.160207.7z" }, { "name": "clink-completions", From 728e83a85bea6ad7b4ddda0b960c443e3ef9f737 Mon Sep 17 00:00:00 2001 From: Martin Kemp Date: Tue, 9 Feb 2016 13:40:32 +0000 Subject: [PATCH 37/41] Set CMDER_START to homeprofile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is to set CMDER_START to home when no directory is given. This is to ensure it is set even though it will default to the home directory anyway. It’ll allow users to use CMDER_START even if started without a path. --- launcher/src/CmderLauncher.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index b2b0ffa..4982fd0 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -3,6 +3,7 @@ #include #include "resource.h" #include +#include #pragma comment(lib, "Shlwapi.lib") @@ -155,7 +156,16 @@ void StartCmder(std::wstring path, bool is_single_mode) } SetEnvironmentVariable(L"CMDER_ROOT", exeDir); - if (!streqi(path.c_str(), L"")) + if (streqi(path.c_str(), L"")) + { + wchar_t* homeProfile = 0; + SHGetKnownFolderPath(FOLDERID_Profile, 0, NULL, &homeProfile); + if (!SetEnvironmentVariable(L"CMDER_START", homeProfile)) { + MessageBox(NULL, _T("Error trying to set CMDER_START to given path!"), _T("Error"), MB_OK); + } + CoTaskMemFree(static_cast(homeProfile)); + } + else { if (!SetEnvironmentVariable(L"CMDER_START", path.c_str())) { MessageBox(NULL, _T("Error trying to set CMDER_START to given path!"), _T("Error"), MB_OK); From 26e6d803645177dc55e3a32ad650838a7f514e2b Mon Sep 17 00:00:00 2001 From: Martin Kemp Date: Tue, 9 Feb 2016 13:57:31 +0000 Subject: [PATCH 38/41] Build on tags For releases. --- appveyor.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index f976d2b..5f37569 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -10,9 +10,6 @@ branches: except: - gh-pages -# Do not build on tags -skip_tags: true - #---------------------------------# # environment configuration # #---------------------------------# @@ -50,7 +47,7 @@ artifacts: #---------------------------------# # notifications # #---------------------------------# - + notifications: # Webhook - provider: Webhook From 842394300f181b045e461044e11c96bfcfa243e8 Mon Sep 17 00:00:00 2001 From: Martin Kemp Date: Tue, 9 Feb 2016 13:58:41 +0000 Subject: [PATCH 39/41] Better defaults for window size. Should now just be a 120x30 at the 500x500px position and saves size and position on close. --- config/ConEmu.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/config/ConEmu.xml b/config/ConEmu.xml index bd520e2..929cf24 100644 --- a/config/ConEmu.xml +++ b/config/ConEmu.xml @@ -123,14 +123,14 @@ - - - + + + - - + + - + From 95bbb8edbb0d9943772786f130d72d2c93ccd632 Mon Sep 17 00:00:00 2001 From: Gregory Pakosz Date: Wed, 10 Feb 2016 14:42:12 +0100 Subject: [PATCH 40/41] Fixed checkGit() in case of submodules Since Git 1.7.8, submodules don't contain a .git/ folder anymore. Instead, the submodule directory is populated with a .git text file which contains a git-dir: /path/to/superproject/git_dir/modules/name. See, https://github.com/git/git/blob/master/Documentation/RelNotes/1.7.8.txt#L109-L114 --- vendor/profile.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/profile.ps1 b/vendor/profile.ps1 index 6ed8a04..5713f76 100644 --- a/vendor/profile.ps1 +++ b/vendor/profile.ps1 @@ -53,7 +53,7 @@ try { } function checkGit($Path) { - if (Test-Path -Path (Join-Path $Path '.git/') ) { + if (Test-Path -Path (Join-Path $Path '.git') ) { Write-VcsStatus return } From 64d981e470da827b95e13fc873a0e0e98d5502f9 Mon Sep 17 00:00:00 2001 From: Gregory Pakosz Date: Tue, 16 Feb 2016 11:15:10 +0100 Subject: [PATCH 41/41] Fixed get_git_dir() to take submodules into account. Fixes #833 --- vendor/clink.lua | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/vendor/clink.lua b/vendor/clink.lua index fed2baf..b6f0059 100644 --- a/vendor/clink.lua +++ b/vendor/clink.lua @@ -71,8 +71,45 @@ local function get_hg_dir(path) return get_dir_contains(path, '.hg') end +-- adapted from from clink-completions' git.lua local function get_git_dir(path) - return get_dir_contains(path, '.git') + + -- return parent path for specified entry (either file or directory) + local function pathname(path) + local prefix = "" + local i = path:find("[\\/:][^\\/:]*$") + if i then + prefix = path:sub(1, i-1) + end + return prefix + end + + -- Checks if provided directory contains git directory + local function has_git_dir(dir) + return #clink.find_dirs(dir..'/.git') > 0 and dir..'/.git' + end + + local function has_git_file(dir) + local gitfile = io.open(dir..'/.git') + if not gitfile then return false end + + local git_dir = gitfile:read():match('gitdir: (.*)') + gitfile:close() + + return git_dir and dir..'/'..git_dir + end + + -- Set default path to current directory + if not path or path == '.' then path = clink.get_cwd() end + + -- Calculate parent path now otherwise we won't be + -- able to do that inside of logical operator + local parent_path = pathname(path) + + return has_git_dir(path) + or has_git_file(path) + -- Otherwise go up one level and make a recursive call + or (parent_path ~= path and get_git_dir(parent_path) or nil) end ---