Merge branch 'master' into master

This commit is contained in:
Retomehere 2018-05-18 20:37:19 +08:00 committed by GitHub
commit 0c39d0a799
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 156 additions and 126 deletions

View File

@ -4,7 +4,7 @@
------------------------------------------------------------------ ------------------------------------------------------------------
Please make sure you read and follow the following instructions Please make sure you read and follow the following instructions
before reporting bugs, and/or requesting new features. carefully before reporting bugs, and/or requesting new features.
Make sure that you have: Make sure that you have:
@ -24,17 +24,22 @@
https://github.com/Maximus5/ConEmu/issues?q=is:issue https://github.com/Maximus5/ConEmu/issues?q=is:issue
If there isn't an existing issue, you may open a new one. 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.) make sure you open the issue in the correct place.)
• If you are asking for Guides on how to integrate Cmder into more info: https://conemu.github.io/en/ThirdPartyProblems.html
your favorite IDE of choice, or how to perform an specific
task with Cmder, make sure you visit our Guides section first:
- https://github.com/cmderdev/cmder/issues?q=label:Guide • If you are asking for guides on how to integrate Cmder into
- https://github.com/cmderdev/cmder/issues?q=label:Question your favorite IDE of choice, or how to perform an 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 the issue is regarding the other upstream technologies that • If the issue is regarding the other upstream technologies that
Cmder uses (e.g. Clink, Git, etc), please make sure that the Cmder uses (e.g. Clink, Git, etc), please make sure that the
@ -43,6 +48,9 @@
tools are NOT used within Cmder, there's a good chance that tools are NOT used within Cmder, there's a good chance that
you should open the bug at the corresponding repo instead. you should open the bug at the corresponding repo instead.
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! Thank you for making sure you are opening a new valid issue!
@ -56,6 +64,9 @@
- Post a screenshot or the command the triggered the problem, if applicable. - Post a screenshot or the command the triggered the problem, if applicable.
- Avoid using ambiguous phrases like: doesn't work, there'a problem, etc. - Avoid using ambiguous phrases like: doesn't work, there'a problem, etc.
Help us reproduce the issue by explaining what went wrong, and what did you expect to happen. Help us reproduce the issue by explaining what went wrong, and what did you expect to happen.
- Please keep the ticket language to English only here.
We can't process your issue if it's written in Russian or Chinese as we can't understand them.
- ⚠ Read the following page to avoid posting a bad issue: https://conemu.github.io/en/BadIssue.html
--> -->
### Purpose of the issue ### Purpose of the issue
@ -64,4 +75,4 @@
- [ ] Question - [ ] Question
### Description of the issue ### Description of the issue
<!-- Provide a clear, simple description of your issue here -->

View File

@ -10,6 +10,8 @@ Cmder is a **software package** created out of pure frustration over absence of
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 **cloud storage**. 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 **cloud storage**. So you can carry your console, aliases and binaries (like wget, curl and git) with you anywhere.
The Cmder's user interface is also designed to be more eye pleasing, and you can compare the main differences between Cmder and ConEmu [here](https://conemu.github.io/en/cmder.html).
## Installation ## Installation
### Single User Portable Config ### Single User Portable Config
@ -79,7 +81,7 @@ In a file explorer window right click in or on a directory to see "Cmder Here" i
* <kbd>Ctrl</kbd> + <kbd>R</kbd> : History search * <kbd>Ctrl</kbd> + <kbd>R</kbd> : History search
* <kbd>Shift</kbd> + Mouse : Select and copy text from buffer * <kbd>Shift</kbd> + Mouse : Select and copy text from buffer
(Some shortcuts are not yet documented, though they exist - please document them here) _(Some shortcuts are not yet documented, though they exist - please document them here)_
## Features ## Features
@ -88,7 +90,7 @@ You can open multiple tabs each containing one of the following shells:
| Task | Shell | Description | | Task | Shell | Description |
| ---- | ----- | ----------- | | ---- | ----- | ----------- |
| Cmder | cmd.exe | Windows 'cmd.exe' shell enhanced with Git, Git aware prompt, Clink(GNU Readline), and Aliases. | | 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. | | Cmder as Admin | cmd.exe | Administrative Windows 'cmd.exe' Cmder shell. |
| PowerShell | powershell.exe | Windows PowerShell enhanced with Git and Git aware prompt . | | PowerShell | powershell.exe | Windows PowerShell enhanced with Git and Git aware prompt . |
| PowerShell as Admin | powershell.exe | Administrative Windows 'powershell.exe' Cmder shell. | | PowerShell as Admin | powershell.exe | Administrative Windows 'powershell.exe' Cmder shell. |
@ -99,9 +101,13 @@ You can open multiple tabs each containing one of the following shells:
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. 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.
Mintty tabs use a program called 'mintty' as the terminal that is not based on the Windows Console API so some differences in functionality are normal, as a result mintty specific config is done via the '[%USERPROFILE%|$HOME]/.minttyrc' file. *NOTE:* Only the full edition of Cmder comes with a pre-installed bash, using a vendored [git-for-windows](https://gitforwindows.org/) installation. The pre-configured Bash tabs may not work on Cmder mini eidition without additional configuration.
Mintty differs from the other tabs in that it supports xterm/xterm-256color TERM types, and does not work with ConEmu settings like color schemes and key bindings. For more on Mintty and its config click [here](https://github.com/mintty/mintty). You may however, choose to use an external installation of bash, such as Microsoft's [Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/install-win10) (called WSL) or the [Cygwin](https://cygwin.com/) project which provides POSIX support on windows.
*NOTE:* Mintty tabs use a program called 'mintty' as the terminal emulator that is not based on the Windows Console API, rather it's rendered graphically by ConEmu. Mintty differs from the other tabs in that it supports xterm/xterm-256color TERM types, and does not work with ConEmu settings like color schemes and key bindings. As such, some differences in functionality are to be expected, such as Cmder not being able to apply a system-wide configuration to it.
As a result mintty specific config is done via the '[%USERPROFILE%|$HOME]/.minttyrc' file. You may read more about Mintty and its config file [here](https://github.com/mintty/mintty).
An example of setting Cmder portable terminal colors for mintty: An example of setting Cmder portable terminal colors for mintty:
@ -114,6 +120,8 @@ cd mintty-colors-solarized/
echo source \$CMDER_ROOT/vendor/mintty-colors-solarized/mintty-solarized-dark.sh>>$CMDER_ROOT/config/user-profile.sh echo source \$CMDER_ROOT/vendor/mintty-colors-solarized/mintty-solarized-dark.sh>>$CMDER_ROOT/config/user-profile.sh
``` ```
You may find some Monokai color schemes for mintty to match Cmder [here](https://github.com/PhilipDaniels/mintty/blob/master/themes/Monokai) or [here](https://github.com/oumu/mintty-color-schemes/blob/master/base16-monokai-mod.minttyrc).
### Changing Cmder Default 'cmd.exe' Shell Startup Behaviour Using Task Arguments ### Changing Cmder Default 'cmd.exe' Shell Startup Behaviour Using Task Arguments
1. Press <kbd>Win</kbd> + <kbd>Alt</kbd> + <kbd>T</kbd> 1. Press <kbd>Win</kbd> + <kbd>Alt</kbd> + <kbd>T</kbd>
@ -211,7 +219,9 @@ Cmder is by default shipped with a vendored Git installation. On each instance
You may use your favorite version of Git by including its path in the `%PATH%` enviroment variable. Moreover, the **Mini** edition of Cmder (found on the [downloads page](https://github.com/cmderdev/cmder/releases)) excludes any vendored Git binaries. You may use your favorite version of Git by including its path in the `%PATH%` enviroment variable. Moreover, the **Mini** edition of Cmder (found on the [downloads page](https://github.com/cmderdev/cmder/releases)) excludes any vendored Git binaries.
### Using external Cygwin/Babun, MSys2, or Git for Windows SDK with Cmder. ### Using external Cygwin/Babun, MSys2, WSL, or Git for Windows SDK with Cmder.
You may run bash (the default shell used on Linux, macOS and GNU/Hurd) externally on Cmder, using the following instructions:
1. Setup a new task by pressing '<kbd>Win</kbd> +<kbd>Alt</kbd> + <kbd>T</kbd>'. 1. Setup a new task by pressing '<kbd>Win</kbd> +<kbd>Alt</kbd> + <kbd>T</kbd>'.
1. Click the '+' button to add a task. 1. Click the '+' button to add a task.
@ -219,7 +229,7 @@ You may use your favorite version of Git by including its path in the `%PATH%` e
1. Provide task parameters, this is optional. 1. Provide task parameters, this is optional.
1. Add ```cmd /c "[path_to_external_env]\bin\bash --login -i" -new_console``` to the `Commands` text box. 1. Add ```cmd /c "[path_to_external_env]\bin\bash --login -i" -new_console``` to the `Commands` text box.
Recommended Optional Steps: **Recommended Optional Steps:**
Copy the 'vendor/cmder_exinit' file to the Cygwin/Babun, MSys2, or Git for Windows SDK environments ```/etc/profile.d/``` folder to use portable settings in the $CMDER_ROOT/config folder. Copy the 'vendor/cmder_exinit' file to the Cygwin/Babun, MSys2, or Git for Windows SDK environments ```/etc/profile.d/``` folder to use portable settings in the $CMDER_ROOT/config folder.
@ -298,9 +308,16 @@ call have NOT "/noautorun" "cmd /c "start %cmder_root%\bin\vsCode\Code.exe --use
``` ```
### Integrating Cmder with [Hyper](https://github.com/zeit/hyper), [Microsoft VS Code](https://code.visualstudio.com/), and your favorite IDEs
Cmder by default comes with a vendored ConEmu installation as the underlying terminal emulator, as stated [here](https://conemu.github.io/en/cmder.html).
However, Cmder can in fact run in a variety of other terminal emulators, and even integrated IDEs. Assuming you have the latest version of Cmder, follow the following instructions to get Cmder working with your own terminal emulator.
For instructions on how to integrate Cmder with your IDE, please read our [Wiki section](https://github.com/cmderdev/cmder/wiki#cmder-integration).
## Upgrading ## Upgrading
The process of upgrading Cmder depends on the version/build you are currently running The process of upgrading Cmder depends on the version/build you are currently running.
If you have a `[cmder_root]/config/user-conemu.xml`, you are running a newer version of Cmder, follow the below process: If you have a `[cmder_root]/config/user-conemu.xml`, you are running a newer version of Cmder, follow the below process:

View File

@ -200,6 +200,8 @@ function Download-File {
$Url, $Url,
$File $File
) )
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
# I think this is the problem # I think this is the problem
$File = $File -Replace "/", "\" $File = $File -Replace "/", "\"
Write-Verbose "Downloading from $Url to $File" Write-Verbose "Downloading from $Url to $File"

6
vendor/init.bat vendored
View File

@ -200,15 +200,15 @@ if defined GIT_INSTALL_ROOT (
) else if exist "!GIT_INSTALL_ROOT!\mingw64" ( ) else if exist "!GIT_INSTALL_ROOT!\mingw64" (
%lib_path% enhance_path "!GIT_INSTALL_ROOT!\mingw64" append %lib_path% enhance_path "!GIT_INSTALL_ROOT!\mingw64" append
) )
%lib_path% enhance_path "%GIT_INSTALL_ROOT%\usr\bin" append %lib_path% enhance_path "!GIT_INSTALL_ROOT!\usr\bin" append
:: define SVN_SSH so we can use git svn with ssh svn repositories :: define SVN_SSH so we can use git svn with ssh svn repositories
if not defined SVN_SSH set "SVN_SSH=%GIT_INSTALL_ROOT:\=\\%\\bin\\ssh.exe" if not defined SVN_SSH set "SVN_SSH=%GIT_INSTALL_ROOT:\=\\%\\bin\\ssh.exe"
) )
:NO_GIT :NO_GIT
endlocal & set "PATH=%PATH%" & set "SVN_SSH=%SVN_SSH%" & set "GIT_INSTALL_ROOT=%GIT_INSTALL_ROOT%" endlocal & set "PATH=%PATH%" & set "SVN_SSH=%SVN_SSH%" & set "GIT_INSTALL_ROOT=!GIT_INSTALL_ROOT!"
%lib_console% debug-output init.bat "Env Var - GIT_INSTALL_ROOT=%GIT_INSTALL_ROOT%" %lib_console% debug-output init.bat "Env Var - GIT_INSTALL_ROOT=!GIT_INSTALL_ROOT!"
:: Enhance Path :: Enhance Path
%lib_path% enhance_path_recursive "%CMDER_ROOT%\bin" %max_depth% %lib_path% enhance_path_recursive "%CMDER_ROOT%\bin" %max_depth%