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.)
more info: https://conemu.github.io/en/ThirdPartyProblems.html
• If you are asking for Guides on how to integrate Cmder into • If you are asking for guides on how to integrate Cmder into
your favorite IDE of choice, or how to perform an specific your favorite IDE of choice, or how to perform an specific
task with Cmder, make sure you visit our Guides section first: task with Cmder, make sure you visit our label section first!
You may already have an answer under the Guides or Questions section.
- https://github.com/cmderdev/cmder/issues?q=label:Guide
- https://github.com/cmderdev/cmder/issues?q=label:Question 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
@ -42,6 +47,9 @@
combination with Cmder. If the bug applies when the mentioned combination with Cmder. If the bug applies when the mentioned
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

@ -1,108 +1,108 @@
/* _ /* _
___ _ __ ___ __| | ___ _ __ ___ _ __ ___ __| | ___ _ __
/ __| '_ ` _ \ / _` |/ _ \ '__| / __| '_ ` _ \ / _` |/ _ \ '__|
| (__| | | | | | (_| | __/ | | (__| | | | | | (_| | __/ |
\___|_| |_| |_|\__,_|\___|_| \___|_| |_| |_|\__,_|\___|_|
============================================================================= =============================================================================
The Cmder Console Emulator Project The Cmder Console Emulator Project
*/ */
#include "resource.h" #include "resource.h"
#include "version.rc2" #include "version.rc2"
#define APSTUDIO_READONLY_SYMBOLS #define APSTUDIO_READONLY_SYMBOLS
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //
// Generated from the TEXTINCLUDE 2 resource. // Generated from the TEXTINCLUDE 2 resource.
// //
#include "winres.h" #include "winres.h"
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS #undef APSTUDIO_READONLY_SYMBOLS
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// English (United States) resources // English (United States) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#ifdef APSTUDIO_INVOKED #ifdef APSTUDIO_INVOKED
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //
// TEXTINCLUDE // TEXTINCLUDE
// //
1 TEXTINCLUDE 1 TEXTINCLUDE
BEGIN BEGIN
"resource.h\0" "resource.h\0"
END END
2 TEXTINCLUDE 2 TEXTINCLUDE
BEGIN BEGIN
"#include ""winres.h""\r\n" "#include ""winres.h""\r\n"
"\0" "\0"
END END
3 TEXTINCLUDE 3 TEXTINCLUDE
BEGIN BEGIN
"\r\n" "\r\n"
"\0" "\0"
END END
#endif // APSTUDIO_INVOKED #endif // APSTUDIO_INVOKED
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //
// Icon // Icon
// //
// Icon with lowest ID value placed first to ensure application icon // Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems. // remains consistent on all systems.
IDI_CMDER ICON "..\\..\\icons\\cmder.ico" IDI_CMDER ICON "..\\..\\icons\\cmder.ico"
#endif // English (United States) resources #endif // English (United States) resources
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //
// Version // Version
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION CMDER_MAJOR_VERSION,CMDER_MINOR_VERSION,CMDER_REVISION_VERSION,CMDER_BUILD_VERSION FILEVERSION CMDER_MAJOR_VERSION,CMDER_MINOR_VERSION,CMDER_REVISION_VERSION,CMDER_BUILD_VERSION
PRODUCTVERSION CMDER_MAJOR_VERSION,CMDER_MINOR_VERSION,CMDER_REVISION_VERSION,CMDER_BUILD_VERSION PRODUCTVERSION CMDER_MAJOR_VERSION,CMDER_MINOR_VERSION,CMDER_REVISION_VERSION,CMDER_BUILD_VERSION
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS (CMDER_DEBUGFLAG | CMDER_BUILDFLAGS) FILEFLAGS (CMDER_DEBUGFLAG | CMDER_BUILDFLAGS)
FILEOS VOS_NT_WINDOWS32 FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_APP FILETYPE VFT_APP
FILESUBTYPE VFT2_UNKNOWN FILESUBTYPE VFT2_UNKNOWN
BEGIN BEGIN
BLOCK "StringFileInfo" BLOCK "StringFileInfo"
BEGIN BEGIN
BLOCK "100904b0" BLOCK "100904b0"
BEGIN BEGIN
VALUE "CompanyName", CMDER_COMPANY_NAME_STR "\0" VALUE "CompanyName", CMDER_COMPANY_NAME_STR "\0"
VALUE "FileDescription", CMDER_FILE_DESCRIPTION_STR "\0" VALUE "FileDescription", CMDER_FILE_DESCRIPTION_STR "\0"
VALUE "FileVersion", CMDER_VERSION_STR "\0" VALUE "FileVersion", CMDER_VERSION_STR "\0"
VALUE "InternalName", CMDER_INTERNAL_NAME_STR "\0" VALUE "InternalName", CMDER_INTERNAL_NAME_STR "\0"
VALUE "LegalCopyright", "Copyright (C) " CMDER_COPYRIGHT_YEAR_STR " " CMDER_COMPANY_NAME_STR "\0" VALUE "LegalCopyright", "Copyright (C) " CMDER_COPYRIGHT_YEAR_STR " " CMDER_COMPANY_NAME_STR "\0"
VALUE "OriginalFilename", CMDER_ORIGINAL_FILENAME_STR "\0" VALUE "OriginalFilename", CMDER_ORIGINAL_FILENAME_STR "\0"
VALUE "ProductName", CMDER_PRODUCT_NAME_STR "\0" VALUE "ProductName", CMDER_PRODUCT_NAME_STR "\0"
VALUE "ProductVersion", CMDER_VERSION_STR "\0" VALUE "ProductVersion", CMDER_VERSION_STR "\0"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"
BEGIN BEGIN
VALUE "Translation", 0x1009, 1200 VALUE "Translation", 0x1009, 1200
END END
END END
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED #ifndef APSTUDIO_INVOKED
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //
// Generated from the TEXTINCLUDE 3 resource. // Generated from the TEXTINCLUDE 3 resource.
// //
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED #endif // not APSTUDIO_INVOKED

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%