mirror of
https://github.com/cmderdev/cmder.git
synced 2025-11-09 05:39:03 +08:00
Compare commits
1 Commits
developmen
...
pr/lib_pat
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f6eb7aa4f8 |
@@ -1,13 +0,0 @@
|
||||
# List of whitespace-only commits to ignore in the Git blame;
|
||||
# to improve tracking changes and avoid noise
|
||||
58db4e3419bf1e5cc1bb61fcd7ce2ebbca89243a
|
||||
efb3338f5cf0eec21e8a75abc62ee14965cb4a7e
|
||||
3859f6ffc088b2ae78748abc84986f4adcadcd41
|
||||
d6569192fc91167f555c3eff58402ff01f1197ea
|
||||
67de97a492c9389f95499db38f9474a1c20ec585
|
||||
a0d085f93eaa69c22449d0217e8daf9eaea2b180
|
||||
1cfba25beb46c74bb1debca2bcfe7ac470e96172
|
||||
f6bc623284914489e891bbac923feb774c862b99
|
||||
abbab3f8b477e917d0a175d0de23cce121096631
|
||||
126347025f9cade241beff182738b2527da7535e
|
||||
4740b836f300658b27e6ad4d79efac63c9c24c24
|
||||
47
.github/workflows/build.yml
vendored
47
.github/workflows/build.yml
vendored
@@ -45,52 +45,12 @@ jobs:
|
||||
- name: Build Cmder Launcher
|
||||
shell: pwsh
|
||||
working-directory: scripts
|
||||
run: .\build.ps1 -Compile -verbose -terminal all
|
||||
run: .\build.ps1 -Compile -verbose
|
||||
|
||||
- name: Pack the built files
|
||||
shell: pwsh
|
||||
working-directory: scripts
|
||||
run: .\pack.ps1 -verbose -terminal all
|
||||
|
||||
- name: Upload artifact (cmder_win_mini.zip)
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
path: build/cmder_win_mini.zip
|
||||
name: cmder_win_mini.zip
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload artifact (cmder_win.7z)
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
path: build/cmder_win.7z
|
||||
name: cmder_win.7z
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload artifact (cmder_win.zip)
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
path: build/cmder_win.zip
|
||||
name: cmder_win.zip
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload artifact (cmder_wt.zip)
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
path: build/cmder_wt.zip
|
||||
name: cmder_wt.zip
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload artifact (cmder_wt.7z)
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
path: build/cmder_wt.7z
|
||||
name: cmder_wt.7z
|
||||
|
||||
- name: Upload artifact (cmder_wt_mini.zip)
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
path: build/cmder_wt_mini.zip
|
||||
name: cmder_wt_mini.zip
|
||||
run: .\pack.ps1 -verbose
|
||||
|
||||
- name: Upload artifact (cmder.zip)
|
||||
uses: actions/upload-artifact@v5
|
||||
@@ -122,11 +82,8 @@ jobs:
|
||||
with:
|
||||
files: |
|
||||
build/cmder.zip
|
||||
build/cmder_wt.zip
|
||||
build/cmder.7z
|
||||
build/cmder_wt.7z
|
||||
build/cmder_mini.zip
|
||||
build/cmder_wt_mini.zip
|
||||
build/hashes.txt
|
||||
draft: true
|
||||
generate_release_notes: true
|
||||
|
||||
7
.gitignore
vendored
7
.gitignore
vendored
@@ -31,10 +31,3 @@ launcher/src/version.rc2
|
||||
.vs/*
|
||||
.vscode
|
||||
.idea
|
||||
.vagrant/
|
||||
scripts/packer/iso/*.iso
|
||||
!scripts/packer/floppy/*.exe
|
||||
scripts/packer/packer_cache
|
||||
scripts/packer/output-*
|
||||
*.box
|
||||
|
||||
|
||||
12
CHANGELOG.md
12
CHANGELOG.md
@@ -1,17 +1,5 @@
|
||||
# Change Log
|
||||
|
||||
## Unreleased
|
||||
|
||||
### Fixes
|
||||
|
||||
- Fixes #2940
|
||||
|
||||
### Adds
|
||||
|
||||
- Cmder for Windows
|
||||
- Uses Windows and Git for Windows Native Terminals.
|
||||
- Does not contain a terminal emulator like ConEmu or Windows Terminal.
|
||||
|
||||
## [1.3.20](https://github.com/cmderdev/cmder/tree/v1.3.20) (2022-03-18)
|
||||
|
||||
### Changes
|
||||
|
||||
74
Cmder.bat
74
Cmder.bat
@@ -1,66 +1,20 @@
|
||||
@echo off
|
||||
|
||||
SET CMDER_ROOT=%~dp0
|
||||
|
||||
set CMDER_TERMINAL=conemu
|
||||
if exist "%CMDER_ROOT%\vendor\windows-terminal\windowsterminal.exe" (
|
||||
SET CMDER_TERMINAL=windows-terminal
|
||||
)
|
||||
|
||||
if NOT "%~1" == "" (
|
||||
SET CMDER_TERMINAL=%~1
|
||||
shift
|
||||
)
|
||||
|
||||
:: Remove Trailing '\'
|
||||
if "%CMDER_ROOT:~-1%" == "\" SET CMDER_ROOT=%CMDER_ROOT:~0,-1%
|
||||
|
||||
if not exist "%CMDER_ROOT%\config" md "%CMDER_ROOT%\config" 2>nul
|
||||
|
||||
call :%CMDER_TERMINAL%
|
||||
exit /b
|
||||
|
||||
:conemu
|
||||
if not exist "%CMDER_ROOT%\config\user_ConEmu.xml" (
|
||||
copy "%CMDER_ROOT%\vendor\ConEmu.xml.default" "%CMDER_ROOT%\config\user_ConEmu.xml" 1>nul
|
||||
if %errorlevel% neq 0 (
|
||||
echo ERROR: CMDER Initialization has Failed
|
||||
exit /b 1
|
||||
)
|
||||
)
|
||||
|
||||
if exist "%~1" (
|
||||
start %cmder_root%\vendor\conemu-maximus5\ConEmu.exe /Icon "%CMDER_ROOT%\icons\cmder.ico" /Title Cmder /LoadCfgFile "%~1"
|
||||
) else (
|
||||
start %cmder_root%\vendor\conemu-maximus5\ConEmu.exe /Icon "%CMDER_ROOT%\icons\cmder.ico" /Title Cmder /LoadCfgFile "%CMDER_ROOT%\config\user_ConEmu.xml"
|
||||
)
|
||||
exit /b
|
||||
|
||||
:windows-terminal
|
||||
if not exist "%CMDER_ROOT%\vendor\windows-terminal\settings" md "%CMDER_ROOT%\vendor\windows-terminal\settings" 2>nul
|
||||
if not exist "%CMDER_ROOT%\vendor\windows-terminal\.portable" echo "This makes this installation of Windows Terminal portable" >"%CMDER_ROOT%\vendor\windows-terminal\.portable" 2>nul
|
||||
|
||||
if exist "%CMDER_ROOT%\config\user_windows_terminal_settings.json" (
|
||||
if not exist "%CMDER_ROOT%\vendor\windows-terminal\settings\settings.json" (
|
||||
echo "Copying user Windows Terminal settings to '%CMDER_ROOT%\vendor\windows-terminal\settings\settings.json'..."
|
||||
copy "%CMDER_ROOT%\config\user_windows_terminal_settings.json" "%CMDER_ROOT%\vendor\windows-terminal\settings\settings.json" 1>nul
|
||||
)
|
||||
) else if not exist "%CMDER_ROOT%\config\user_windows_terminal_settings.json" (
|
||||
if not exist "%CMDER_ROOT%\config" mkdir "%CMDER_ROOT%\config" 2>nul
|
||||
echo "Copying default Windows Terminal settings to '%CMDER_ROOT%\config'..."
|
||||
copy "%CMDER_ROOT%\vendor\windows_terminal_default_settings.json" "%CMDER_ROOT%\config\user_windows_terminal_settings.json" 1>nul
|
||||
echo "Copying default Windows Terminal settings to '%CMDER_ROOT%\vendor\windows-terminal\settings\settings.json'..."
|
||||
copy "%CMDER_ROOT%\vendor\windows_terminal_default_settings.json" "%CMDER_ROOT%\vendor\windows-terminal\settings\settings.json" 1>nul
|
||||
|
||||
if %errorlevel% neq 0 (
|
||||
echo ERROR: CMDER Initialization has Failed
|
||||
exit /b 1
|
||||
)
|
||||
) else if exist "%cmder_root%\vendor\windows-terminal\settings\settings.json" (
|
||||
copy "%cmder_root%\vendor\windows-terminal\settings\settings.json" "%CMDER_ROOT%\config\user_windows_terminal_settings.json"
|
||||
)
|
||||
|
||||
start %cmder_root%\vendor\windows-terminal\windowsterminal.exe
|
||||
exit /b
|
||||
@if "%CMDER_ROOT:~-1%" == "\" SET CMDER_ROOT=%CMDER_ROOT:~0,-1%
|
||||
|
||||
if not exist "%CMDER_ROOT%\config\user_ConEmu.xml" (
|
||||
if not exist "%CMDER_ROOT%\config" mkdir "%CMDER_ROOT%\config" 2>nul
|
||||
copy "%CMDER_ROOT%\vendor\ConEmu.xml.default" "%CMDER_ROOT%\config\user_ConEmu.xml" 1>nul
|
||||
if %errorlevel% neq 0 (
|
||||
echo ERROR: CMDER Initialization has Failed
|
||||
exit /b 1
|
||||
)
|
||||
)
|
||||
|
||||
if exist "%~1" (
|
||||
start %~dp0/vendor/conemu-maximus5/ConEmu.exe /Icon "%CMDER_ROOT%\icons\cmder.ico" /Title Cmder /LoadCfgFile "%~1"
|
||||
) else (
|
||||
start %~dp0/vendor/conemu-maximus5/ConEmu.exe /Icon "%CMDER_ROOT%\icons\cmder.ico" /Title Cmder /LoadCfgFile "%CMDER_ROOT%\config\user_ConEmu.xml"
|
||||
)
|
||||
|
||||
@@ -60,7 +60,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. |
|
||||
| `-- [ConEmu extras pars]` | Forwards ALL remaining parameters to ConEmu. |
|
||||
| `/X [ConEmu extras pars]` | Forwards parameters to ConEmu |
|
||||
|
||||
## Context Menu Integration
|
||||
|
||||
@@ -352,10 +352,6 @@ Cmder by default comes with a vendored ConEmu installation as the underlying ter
|
||||
|
||||
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.
|
||||
|
||||
⚠ *Note:* Cmder includes built-in support for Windows Terminal directory tracking via OSC 9;9 sequences. This enables "Duplicate Tab" and "Split Pane" features to preserve the current working directory for both `cmd.exe` and PowerShell sessions.
|
||||
|
||||
⚠ *Note:* Cmder also includes built-in support for [Windows Terminal shell integration](https://learn.microsoft.com/en-us/windows/terminal/tutorials/shell-integration) via OSC 133 sequences (A, B, C) for PowerShell sessions. This enables features like command navigation (jump between commands), command selection, visual command separators, and improved command history management in Windows Terminal.
|
||||
|
||||
For instructions on how to integrate Cmder with your IDE, please read our [Wiki section](https://github.com/cmderdev/cmder/wiki#cmder-integration).
|
||||
|
||||
## Upgrading
|
||||
|
||||
@@ -188,9 +188,6 @@
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\CmderLauncher.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="..\icons\cmder.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
||||
@@ -107,9 +107,9 @@ bool FileExists(const wchar_t * filePath)
|
||||
|
||||
void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstring taskName = L"", std::wstring title = L"", std::wstring iconPath = 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 };
|
||||
#endif
|
||||
#if USE_TASKBAR_API
|
||||
wchar_t appId[MAX_PATH] = { 0 };
|
||||
#endif
|
||||
wchar_t exeDir[MAX_PATH] = { 0 };
|
||||
wchar_t icoPath[MAX_PATH] = { 0 };
|
||||
wchar_t cfgPath[MAX_PATH] = { 0 };
|
||||
@@ -117,7 +117,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
|
||||
wchar_t cpuCfgPath[MAX_PATH] = { 0 };
|
||||
wchar_t userCfgPath[MAX_PATH] = { 0 };
|
||||
wchar_t defaultCfgPath[MAX_PATH] = { 0 };
|
||||
wchar_t terminalPath[MAX_PATH] = { 0 };
|
||||
wchar_t conEmuPath[MAX_PATH] = { 0 };
|
||||
wchar_t configDirPath[MAX_PATH] = { 0 };
|
||||
wchar_t userConfigDirPath[MAX_PATH] = { 0 };
|
||||
wchar_t userBinDirPath[MAX_PATH] = { 0 };
|
||||
@@ -128,34 +128,21 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
|
||||
wchar_t legacyUserAliasesPath[MAX_PATH] = { 0 };
|
||||
wchar_t args[MAX_PATH * 2 + 256] = { 0 };
|
||||
wchar_t userConEmuCfgPath[MAX_PATH] = { 0 };
|
||||
wchar_t windowsTerminalDir[MAX_PATH] = { 0 };
|
||||
wchar_t conEmuDir[MAX_PATH] = { 0 };
|
||||
wchar_t winDir[MAX_PATH] = { 0 };
|
||||
wchar_t vendorDir[MAX_PATH] = { 0 };
|
||||
wchar_t initCmd[MAX_PATH] = { 0 };
|
||||
wchar_t initPowerShell[MAX_PATH] = { 0 };
|
||||
wchar_t initBash[MAX_PATH] = { 0 };
|
||||
wchar_t initMintty[MAX_PATH] = { 0 };
|
||||
wchar_t vendoredGit[MAX_PATH] = { 0 };
|
||||
wchar_t amdx64Git[MAX_PATH] = { 0 };
|
||||
wchar_t x86Git[MAX_PATH] = { 0 };
|
||||
wchar_t programFiles[MAX_PATH] = { 0 };
|
||||
wchar_t programFilesX86[MAX_PATH] = { 0 };
|
||||
wchar_t minTTYPath[MAX_PATH] = { 0 };
|
||||
|
||||
|
||||
std::wstring cmderStart = path;
|
||||
std::wstring cmderTask = taskName;
|
||||
std::wstring cmderTitle = title;
|
||||
std::wstring cmderTerminalArgs = conemu_args;
|
||||
std::wstring cmderConEmuArgs = conemu_args;
|
||||
|
||||
std::copy(cfgRoot.begin(), cfgRoot.end(), userConfigDirPath);
|
||||
userConfigDirPath[cfgRoot.length()] = 0;
|
||||
|
||||
GetModuleFileName(NULL, exeDir, sizeof(exeDir));
|
||||
|
||||
#if USE_TASKBAR_API
|
||||
wcscpy_s(appId, exeDir);
|
||||
#endif
|
||||
#if USE_TASKBAR_API
|
||||
wcscpy_s(appId, exeDir);
|
||||
#endif
|
||||
|
||||
PathRemoveFileSpec(exeDir);
|
||||
|
||||
@@ -179,8 +166,8 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
|
||||
{
|
||||
PathCombine(userProfilePath, configDirPath, L"user_profile.cmd");
|
||||
|
||||
char* lPr = (char*)malloc(MAX_PATH);
|
||||
char* pR = (char*)malloc(MAX_PATH);
|
||||
char *lPr = (char *)malloc(MAX_PATH);
|
||||
char *pR = (char *)malloc(MAX_PATH);
|
||||
size_t i;
|
||||
wcstombs_s(&i, lPr, (size_t)MAX_PATH,
|
||||
legacyUserProfilePath, (size_t)MAX_PATH);
|
||||
@@ -197,8 +184,8 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
|
||||
{
|
||||
PathCombine(userAliasesPath, configDirPath, L"user_aliases.cmd");
|
||||
|
||||
char* lPr = (char*)malloc(MAX_PATH);
|
||||
char* pR = (char*)malloc(MAX_PATH);
|
||||
char *lPr = (char *)malloc(MAX_PATH);
|
||||
char *pR = (char *)malloc(MAX_PATH);
|
||||
size_t i;
|
||||
wcstombs_s(&i, lPr, (size_t)MAX_PATH,
|
||||
legacyUserAliasesPath, (size_t)MAX_PATH);
|
||||
@@ -235,8 +222,8 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
|
||||
{
|
||||
PathCombine(userProfilePath, userConfigDirPath, L"user_profile.cmd");
|
||||
|
||||
char* lPr = (char*)malloc(MAX_PATH);
|
||||
char* pR = (char*)malloc(MAX_PATH);
|
||||
char *lPr = (char *)malloc(MAX_PATH);
|
||||
char *pR = (char *)malloc(MAX_PATH);
|
||||
size_t i;
|
||||
wcstombs_s(&i, lPr, (size_t)MAX_PATH,
|
||||
legacyUserProfilePath, (size_t)MAX_PATH);
|
||||
@@ -253,8 +240,8 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
|
||||
{
|
||||
PathCombine(userAliasesPath, userConfigDirPath, L"user_aliases.cmd");
|
||||
|
||||
char* lPr = (char*)malloc(MAX_PATH);
|
||||
char* pR = (char*)malloc(MAX_PATH);
|
||||
char *lPr = (char *)malloc(MAX_PATH);
|
||||
char *pR = (char *)malloc(MAX_PATH);
|
||||
size_t i;
|
||||
wcstombs_s(&i, lPr, (size_t)MAX_PATH,
|
||||
legacyUserAliasesPath, (size_t)MAX_PATH);
|
||||
@@ -264,158 +251,71 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
|
||||
}
|
||||
}
|
||||
|
||||
PathCombine(vendorDir, exeDir, L"vendor");
|
||||
PathCombine(windowsTerminalDir, vendorDir, L"windows-terminal");
|
||||
PathCombine(conEmuDir, vendorDir, L"conemu-maximus5");
|
||||
GetEnvironmentVariable(L"WINDIR", winDir, MAX_PATH);
|
||||
// Set path to vendored ConEmu config file
|
||||
PathCombine(cfgPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu.xml");
|
||||
|
||||
if (PathFileExists(windowsTerminalDir))
|
||||
{
|
||||
// Set path to vendored ConEmu config file
|
||||
PathCombine(cfgPath, windowsTerminalDir, L"settings\\settings.json");
|
||||
// Set path to Cmder default ConEmu config file
|
||||
PathCombine(defaultCfgPath, exeDir, L"vendor\\ConEmu.xml.default");
|
||||
|
||||
// Set path to Cmder default ConEmu config file
|
||||
PathCombine(defaultCfgPath, exeDir, L"vendor\\windows_terminal_default_settings.json");
|
||||
// Check for machine-specific then user config source file.
|
||||
PathCombine(cpuCfgPath, userConfigDirPath, L"ConEmu-%COMPUTERNAME%.xml");
|
||||
ExpandEnvironmentStrings(cpuCfgPath, cpuCfgPath, sizeof(cpuCfgPath) / sizeof(cpuCfgPath[0]));
|
||||
|
||||
// Check for machine-specific then user config source file.
|
||||
PathCombine(cpuCfgPath, userConfigDirPath, L"windows_terminal_%COMPUTERNAME%_settings.json");
|
||||
ExpandEnvironmentStrings(cpuCfgPath, cpuCfgPath, sizeof(cpuCfgPath) / sizeof(cpuCfgPath[0]));
|
||||
// Set path to Cmder user ConEmu config file
|
||||
PathCombine(userCfgPath, userConfigDirPath, L"user-ConEmu.xml");
|
||||
|
||||
// Set path to Cmder user ConEmu config file
|
||||
PathCombine(userCfgPath, userConfigDirPath, L"user_windows_terminal_settings.json");
|
||||
}
|
||||
else if (PathFileExists(conEmuDir))
|
||||
{
|
||||
// Set path to vendored ConEmu config file
|
||||
PathCombine(cfgPath, conEmuDir, L"ConEmu.xml");
|
||||
|
||||
// Set path to Cmder default ConEmu config file
|
||||
PathCombine(defaultCfgPath, exeDir, L"vendor\\ConEmu.xml.default");
|
||||
|
||||
// Check for machine-specific then user config source file.
|
||||
PathCombine(cpuCfgPath, userConfigDirPath, L"ConEmu-%COMPUTERNAME%.xml");
|
||||
ExpandEnvironmentStrings(cpuCfgPath, cpuCfgPath, sizeof(cpuCfgPath) / sizeof(cpuCfgPath[0]));
|
||||
|
||||
// Set path to Cmder user ConEmu config file
|
||||
PathCombine(userCfgPath, userConfigDirPath, L"user-ConEmu.xml");
|
||||
}
|
||||
|
||||
if (wcscmp(cpuCfgPath, L"") != 0 && (PathFileExists(cpuCfgPath) || use_user_cfg == false)) // config/[host specific terminal emulator config] file exists or /m was specified on command line, use machine specific config.
|
||||
if ( PathFileExists(cpuCfgPath) || use_user_cfg == false ) // config/ConEmu-%COMPUTERNAME%.xml file exists or /m was specified on command line, use machine specific config.
|
||||
{
|
||||
if (cfgRoot.length() == 0) // '/c [path]' was NOT specified
|
||||
{
|
||||
if (PathFileExists(cfgPath)) // [terminal emulator config] file exists, copy [terminal emulator config] to config/user_[terminal emulator config] file to backup any settings changes from previous sessions.
|
||||
if (PathFileExists(cfgPath)) // vendor/conemu-maximus5/ConEmu.xml file exists, copy vendor/conemu-maximus5/ConEmu.xml to config/ConEmu-%COMPUTERNAME%.xml.
|
||||
{
|
||||
if (!CopyFile(cfgPath, cpuCfgPath, FALSE))
|
||||
{
|
||||
if (PathFileExists(windowsTerminalDir)) {
|
||||
MessageBox(NULL,
|
||||
(GetLastError() == ERROR_ACCESS_DENIED)
|
||||
? L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/windows_terminal_%COMPUTERNAME%_settings.json! Access Denied."
|
||||
: L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/windows_terminal_%COMPUTERNAME%_settigns.json!", MB_TITLE, MB_ICONSTOP);
|
||||
exit(1);
|
||||
}
|
||||
else if (PathFileExists(conEmuDir))
|
||||
{
|
||||
MessageBox(NULL,
|
||||
(GetLastError() == ERROR_ACCESS_DENIED)
|
||||
? L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/ConEmu-%COMPUTERNAME%.xml! Access Denied."
|
||||
: L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/ConEmu-%COMPUTERNAME%.xml!", MB_TITLE, MB_ICONSTOP);
|
||||
exit(1);
|
||||
}
|
||||
MessageBox(NULL,
|
||||
(GetLastError() == ERROR_ACCESS_DENIED)
|
||||
? L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/ConEmu-%COMPUTERNAME%.xml! Access Denied."
|
||||
: L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/ConEmu-%COMPUTERNAME%.xml!", MB_TITLE, MB_ICONSTOP);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
else // [terminal emulator config] file does not exist, copy config/[host specific terminal emulator config] file to [terminal emulator config] file
|
||||
else // vendor/conemu-maximus5/ConEmu.xml config file does not exist, copy config/ConEmu-%COMPUTERNAME%.xml to vendor/conemu-maximus5/ConEmu.xml file
|
||||
{
|
||||
if (!CopyFile(cpuCfgPath, cfgPath, FALSE))
|
||||
{
|
||||
if (PathFileExists(windowsTerminalDir)) {
|
||||
MessageBox(NULL,
|
||||
(GetLastError() == ERROR_ACCESS_DENIED)
|
||||
? L"Failed to copy config/windows_terminal_%COMPUTERNAME%_settings.json file to vendor/windows-terminal/settings/settings.json! Access Denied."
|
||||
: L"Failed to copy config/windows_terminal_%COMPUTERNAME%_settings.json file to vendor/windows-terminal/settings/settings.json!", MB_TITLE, MB_ICONSTOP);
|
||||
exit(1);
|
||||
}
|
||||
else if (PathFileExists(conEmuDir))
|
||||
{
|
||||
MessageBox(NULL,
|
||||
(GetLastError() == ERROR_ACCESS_DENIED)
|
||||
? L"Failed to copy config/ConEmu-%COMPUTERNAME%.xml file to vendor/conemu-maximus5/ConEmu.xml! Access Denied."
|
||||
: L"Failed to copy config/ConEmu-%COMPUTERNAME%.xml file to vendor/conemu-maximus5/ConEmu.xml!", MB_TITLE, MB_ICONSTOP);
|
||||
exit(1);
|
||||
}
|
||||
MessageBox(NULL,
|
||||
(GetLastError() == ERROR_ACCESS_DENIED)
|
||||
? L"Failed to copy config/ConEmu-%COMPUTERNAME%.xml file to vendor/conemu-maximus5/ConEmu.xml! Access Denied."
|
||||
: L"Failed to copy config/ConEmu-%COMPUTERNAME%.xml file to vendor/conemu-maximus5/ConEmu.xml!", MB_TITLE, MB_ICONSTOP);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (wcscmp(userCfgPath, L"") != 0 && PathFileExists(userCfgPath)) // config/user[terminal emulator config] file exists, use it.
|
||||
{
|
||||
if (cfgRoot.length() == 0) // '/c [path]' was NOT specified
|
||||
else // '/c [path]' was specified, don't copy anything and use existing conemu-%COMPUTERNAME%.xml to start comemu.
|
||||
{
|
||||
if (PathFileExists(cfgPath)) // [terminal emulator config] file exists, copy [terminal emulator config] to config/user_[terminal emulator config] file to backup any settings changes from previous sessions.
|
||||
if (use_user_cfg == false && PathFileExists(cfgPath) && !PathFileExists(cpuCfgPath)) // vendor/conemu-maximus5/ConEmu.xml file exists, copy vendor/conemu-maximus5/ConEmu.xml to config/ConEmu-%COMPUTERNAME%.xml.
|
||||
{
|
||||
if (!CopyFile(cfgPath, userCfgPath, FALSE))
|
||||
{
|
||||
if (PathFileExists(windowsTerminalDir))
|
||||
{
|
||||
MessageBox(NULL,
|
||||
(GetLastError() == ERROR_ACCESS_DENIED)
|
||||
? L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/windows_terminal_settings.json! Access Denied."
|
||||
: L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/windows_terminal_settigns.json!", MB_TITLE, MB_ICONSTOP);
|
||||
exit(1);
|
||||
}
|
||||
else if (PathFileExists(conEmuDir))
|
||||
{
|
||||
MessageBox(NULL,
|
||||
(GetLastError() == ERROR_ACCESS_DENIED)
|
||||
? L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/user-conemu.xml! Access Denied."
|
||||
: L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/user-conemu.xml!", MB_TITLE, MB_ICONSTOP);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
else // [terminal emulator config] file does not exist, copy config/user_[terminal emulator config] file to [terminal emulator config] file
|
||||
{
|
||||
if (!CopyFile(userCfgPath, cfgPath, FALSE))
|
||||
{
|
||||
if (PathFileExists(windowsTerminalDir))
|
||||
{
|
||||
MessageBox(NULL,
|
||||
(GetLastError() == ERROR_ACCESS_DENIED)
|
||||
? L"Failed to copy config/user_windows_terminal_settings.json file to vendor/windows-terminal/settings/settings.json! Access Denied."
|
||||
: L"Failed to copy config/user_windows_terminal_settings.json file to vendor/windows-terminal/settings/settings.json!", MB_TITLE, MB_ICONSTOP);
|
||||
exit(1);
|
||||
}
|
||||
else if (PathFileExists(conEmuDir))
|
||||
{
|
||||
MessageBox(NULL,
|
||||
(GetLastError() == ERROR_ACCESS_DENIED)
|
||||
? L"Failed to copy config/user-conemu.xml file to vendor/conemu-maximus5/ConEmu.xml! Access Denied."
|
||||
: L"Failed to copy config/user-conemu.xml file to vendor/conemu-maximus5/ConEmu.xml!", MB_TITLE, MB_ICONSTOP);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!PathFileExists(windowsTerminalDir)) { // '/c [path]' was specified, don't copy anything and use existing user_[terminal emulator config] file.
|
||||
PathCombine(userConEmuCfgPath, userConfigDirPath, L"user-ConEmu.xml");
|
||||
}
|
||||
}
|
||||
else if (cfgRoot.length() == 0) // '/c [path]' was NOT specified
|
||||
{
|
||||
if (PathFileExists(cfgPath)) // [terminal emulator config] file exists, copy [terminal emulator config] file to config/user_[terminal emulator config] file.
|
||||
{
|
||||
if (!CopyFile(cfgPath, userCfgPath, FALSE))
|
||||
{
|
||||
if (PathFileExists(windowsTerminalDir))
|
||||
if (!CopyFile(cfgPath, cpuCfgPath, FALSE))
|
||||
{
|
||||
MessageBox(NULL,
|
||||
(GetLastError() == ERROR_ACCESS_DENIED)
|
||||
? L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/user_windows_terminal_settings.json! Access Denied."
|
||||
: L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/user_windows_terminal_settigns.json!", MB_TITLE, MB_ICONSTOP);
|
||||
? L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/ConEmu-%COMPUTERNAME%.xml! Access Denied."
|
||||
: L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/ConEmu-%COMPUTERNAME%.xml!", MB_TITLE, MB_ICONSTOP);
|
||||
exit(1);
|
||||
}
|
||||
else if (PathFileExists(conEmuDir))
|
||||
}
|
||||
|
||||
PathCombine(userConEmuCfgPath, userConfigDirPath, L"ConEmu-%COMPUTERNAME%.xml");
|
||||
ExpandEnvironmentStrings(userConEmuCfgPath, userConEmuCfgPath, sizeof(userConEmuCfgPath) / sizeof(userConEmuCfgPath[0]));
|
||||
}
|
||||
}
|
||||
else if (PathFileExists(userCfgPath)) // config/user_conemu.xml exists, use it.
|
||||
{
|
||||
if (cfgRoot.length() == 0) // '/c [path]' was NOT specified
|
||||
{
|
||||
if (PathFileExists(cfgPath)) // vendor/conemu-maximus5/ConEmu.xml exists, copy vendor/conemu-maximus5/ConEmu.xml to config/user_conemu.xml.
|
||||
{
|
||||
if (!CopyFile(cfgPath, userCfgPath, FALSE))
|
||||
{
|
||||
MessageBox(NULL,
|
||||
(GetLastError() == ERROR_ACCESS_DENIED)
|
||||
@@ -424,51 +324,28 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
else // vendor/[terminal emulator config].default config exists, copy Cmder vendor/[terminal emulator config].default file to [terminal emulator config] file.
|
||||
else // vendor/conemu-maximus5/ConEmu.xml does not exist, copy config/user-conemu.xml to vendor/conemu-maximus5/ConEmu.xml
|
||||
{
|
||||
if (!CopyFile(defaultCfgPath, cfgPath, FALSE))
|
||||
if (!CopyFile(userCfgPath, cfgPath, FALSE))
|
||||
{
|
||||
if (PathFileExists(windowsTerminalDir))
|
||||
{
|
||||
MessageBox(NULL,
|
||||
(GetLastError() == ERROR_ACCESS_DENIED)
|
||||
? L"Failed to copy vendor/windows-terminal_default_settings_settings.json file to vendor/windows-terminal/settings/settings.json! Access Denied."
|
||||
: L"Failed to copy vendor/windows-terminal_default_settings_settings.json file to vendor/windows-terminal/settings/settigns.json!", MB_TITLE, MB_ICONSTOP);
|
||||
exit(1);
|
||||
}
|
||||
else if (PathFileExists(conEmuDir))
|
||||
{
|
||||
MessageBox(NULL,
|
||||
(GetLastError() == ERROR_ACCESS_DENIED)
|
||||
? L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml! Access Denied."
|
||||
: L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml!", MB_TITLE, MB_ICONSTOP);
|
||||
exit(1);
|
||||
}
|
||||
MessageBox(NULL,
|
||||
(GetLastError() == ERROR_ACCESS_DENIED)
|
||||
? L"Failed to copy config/user-conemu.xml file to vendor/conemu-maximus5/ConEmu.xml! Access Denied."
|
||||
: L"Failed to copy config/user-conemu.xml file to vendor/conemu-maximus5/ConEmu.xml!", MB_TITLE, MB_ICONSTOP);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!CopyFile(defaultCfgPath, cfgPath, FALSE) && PathFileExists(conEmuDir))
|
||||
else // '/c [path]' was specified, don't copy anything and use existing user_conemu.xml to start comemu.
|
||||
{
|
||||
MessageBox(NULL,
|
||||
(GetLastError() == ERROR_ACCESS_DENIED)
|
||||
? L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml! Access Denied."
|
||||
: L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml!", MB_TITLE, MB_ICONSTOP);
|
||||
exit(1);
|
||||
PathCombine(userConEmuCfgPath, userConfigDirPath, L"user-ConEmu.xml");
|
||||
}
|
||||
}
|
||||
else if (wcscmp(cfgPath, L"") != 0 && PathFileExists(cfgPath)) // This is a first time Cmder.exe run and [terminal emulator config] file exists, copy [terminal emulator config] file to config/user_[terminal emulator config] file.
|
||||
else if (cfgRoot.length() == 0) // '/c [path]' was NOT specified
|
||||
{
|
||||
if (!CopyFile(cfgPath, userCfgPath, FALSE))
|
||||
if (PathFileExists(cfgPath)) // vendor/conemu-maximus5/ConEmu.xml exists, copy vendor/conemu-maximus5/ConEmu.xml to config/user_conemu.xml
|
||||
{
|
||||
if (PathFileExists(windowsTerminalDir))
|
||||
{
|
||||
MessageBox(NULL,
|
||||
(GetLastError() == ERROR_ACCESS_DENIED)
|
||||
? L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/user_windows_terminal_settings_settings.json! Access Denied."
|
||||
: L"Failed to copy vendor/windows-terminal/settings/settings.json file to config/user_windows_terminal_settings_settigns.json!", MB_TITLE, MB_ICONSTOP);
|
||||
exit(1);
|
||||
}
|
||||
else
|
||||
if (!CopyFile(cfgPath, userCfgPath, FALSE))
|
||||
{
|
||||
MessageBox(NULL,
|
||||
(GetLastError() == ERROR_ACCESS_DENIED)
|
||||
@@ -476,146 +353,99 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
|
||||
: L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/user-conemu.xml!", MB_TITLE, MB_ICONSTOP);
|
||||
exit(1);
|
||||
}
|
||||
else // vendor/ConEmu.xml.default config exists, copy Cmder vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml.
|
||||
{
|
||||
if (!CopyFile(defaultCfgPath, cfgPath, FALSE))
|
||||
{
|
||||
MessageBox(NULL,
|
||||
(GetLastError() == ERROR_ACCESS_DENIED)
|
||||
? L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml! Access Denied."
|
||||
: L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml!", MB_TITLE, MB_ICONSTOP);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!CopyFile(defaultCfgPath, cfgPath, FALSE))
|
||||
{
|
||||
MessageBox(NULL,
|
||||
(GetLastError() == ERROR_ACCESS_DENIED)
|
||||
? L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml! Access Denied."
|
||||
: L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml!", MB_TITLE, MB_ICONSTOP);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (PathFileExists(cfgPath)) // vendor/conemu-maximus5/ConEmu.xml exists, copy vendor/conemu-maximus5/ConEmu.xml to config/user_conemu.xml
|
||||
{
|
||||
if (!CopyFile(cfgPath, userCfgPath, FALSE))
|
||||
{
|
||||
MessageBox(NULL,
|
||||
(GetLastError() == ERROR_ACCESS_DENIED)
|
||||
? L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/user-conemu.xml! Access Denied."
|
||||
: L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/user-conemu.xml!", MB_TITLE, MB_ICONSTOP);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
PathCombine(userConEmuCfgPath, userConfigDirPath, L"user-ConEmu.xml");
|
||||
}
|
||||
else if (wcscmp(defaultCfgPath, L"") != 0) // '/c [path]' was specified and 'vendor/[terminal emulator config].default' config exists, copy Cmder 'vendor/[terminal emulator config].default' file to '[user specified path]/config/user_[terminal emulator config]'.
|
||||
else // '/c [path]' was specified and 'vendor/ConEmu.xml.default' config exists, copy Cmder 'vendor/ConEmu.xml.default' file to '[user specified path]/config/user_ConEmu.xml'.
|
||||
{
|
||||
if ( ! CopyFile(defaultCfgPath, userCfgPath, FALSE))
|
||||
{
|
||||
if (PathFileExists(windowsTerminalDir))
|
||||
{
|
||||
MessageBox(NULL,
|
||||
(GetLastError() == ERROR_ACCESS_DENIED)
|
||||
? L"Failed to copy vendor/windows-terminal_default_settings_settings.json file to [user specified path]/config/user_windows_terminal_settings.json! Access Denied."
|
||||
: L"Failed to copy vendor/windows-terminal_default_settings_settings.json file to [user specified path]/config/user_windows_terminal_settings.json!", MB_TITLE, MB_ICONSTOP);
|
||||
exit(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox(NULL,
|
||||
(GetLastError() == ERROR_ACCESS_DENIED)
|
||||
? L"Failed to copy vendor/ConEmu.xml.default file to [user specified path]/config/user_ConEmu.xml! Access Denied."
|
||||
: L"Failed to copy vendor/ConEmu.xml.default file to [user specified path]/config/user_ConEmu.xml!", MB_TITLE, MB_ICONSTOP);
|
||||
exit(1);
|
||||
}
|
||||
MessageBox(NULL,
|
||||
(GetLastError() == ERROR_ACCESS_DENIED)
|
||||
? L"Failed to copy vendor/ConEmu.xml.default file to [user specified path]/config/user_ConEmu.xml! Access Denied."
|
||||
: L"Failed to copy vendor/ConEmu.xml.default file to [user specified path]/config/user_ConEmu.xml!", MB_TITLE, MB_ICONSTOP);
|
||||
exit(1);
|
||||
}
|
||||
PathCombine(userConEmuCfgPath, userConfigDirPath, L"user-ConEmu.xml");
|
||||
}
|
||||
|
||||
GetEnvironmentVariable(L"ProgramFiles", programFiles, MAX_PATH);
|
||||
GetEnvironmentVariable(L"ProgramFiles(x86)", programFilesX86, MAX_PATH);
|
||||
|
||||
PathCombine(vendoredGit, vendorDir, L"git-for-windows");
|
||||
PathCombine(amdx64Git, programFiles, L"Git");
|
||||
PathCombine(x86Git, programFilesX86, L"Git");
|
||||
|
||||
SYSTEM_INFO sysInfo;
|
||||
GetNativeSystemInfo(&sysInfo);
|
||||
if (PathFileExists(windowsTerminalDir))
|
||||
if (sysInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64)
|
||||
{
|
||||
PathCombine(terminalPath, exeDir, L"vendor\\windows-terminal\\WindowsTerminal.exe");
|
||||
}
|
||||
else if (PathFileExists(conEmuDir))
|
||||
{
|
||||
swprintf_s(args, L"%s /Icon \"%s\"", args, icoPath);
|
||||
swprintf_s(args, L"%s /title \"%s\"", args, cmderTitle.c_str());
|
||||
PathCombine(terminalPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu64.exe");
|
||||
PathCombine(conEmuPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu64.exe");
|
||||
}
|
||||
else
|
||||
{
|
||||
PathCombine(terminalPath, winDir, L"system32\\cmd.exe");
|
||||
|
||||
if (streqi(cmderTask.c_str(), L"powershell"))
|
||||
{
|
||||
PathCombine(terminalPath, winDir, L"System32\\WindowsPowerShell\\v1.0\\powershell.exe");
|
||||
}
|
||||
/*
|
||||
else if (streqi(cmderTask.c_str(), L"mintty"))
|
||||
{
|
||||
if (PathFileExists(vendoredGit))
|
||||
{
|
||||
PathCombine(terminalPath, vendoredGit, L"git-bash.exe");
|
||||
}
|
||||
else if (PathFileExists(amdx64Git))
|
||||
{
|
||||
PathCombine(terminalPath, amdx64Git, L"git-bash.exe");
|
||||
}
|
||||
else if (PathFileExists(x86Git))
|
||||
{
|
||||
PathCombine(terminalPath, x86Git, L"git-bash.exe");
|
||||
}
|
||||
}
|
||||
*/
|
||||
PathCombine(conEmuPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu.exe");
|
||||
}
|
||||
|
||||
swprintf_s(args, L"%s /Icon \"%s\"", args, icoPath);
|
||||
|
||||
if (!streqi(cmderStart.c_str(), L""))
|
||||
{
|
||||
if (PathFileExists(windowsTerminalDir)) {
|
||||
swprintf_s(args, L"%s -d \"%s\"", args, cmderStart.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
swprintf_s(args, L"%s /dir \"%s\"", args, cmderStart.c_str());
|
||||
}
|
||||
swprintf_s(args, L"%s /dir \"%s\"", args, cmderStart.c_str());
|
||||
}
|
||||
|
||||
if (is_single_mode)
|
||||
{
|
||||
if (!PathFileExists(windowsTerminalDir)) {
|
||||
swprintf_s(args, L"%s /single", args);
|
||||
}
|
||||
swprintf_s(args, L"%s /single", args);
|
||||
}
|
||||
|
||||
if (!streqi(cmderTitle.c_str(), L""))
|
||||
{
|
||||
swprintf_s(args, L"%s /title \"%s\"", args, cmderTitle.c_str());
|
||||
}
|
||||
|
||||
if (cfgRoot.length() != 0)
|
||||
{
|
||||
if (!PathFileExists(windowsTerminalDir)) {
|
||||
swprintf_s(args, L"%s -loadcfgfile \"%s\"", args, userConEmuCfgPath);
|
||||
}
|
||||
swprintf_s(args, L"%s -loadcfgfile \"%s\"", args, userConEmuCfgPath);
|
||||
}
|
||||
|
||||
if (!streqi(cmderTerminalArgs.c_str(), L""))
|
||||
if (!streqi(cmderConEmuArgs.c_str(), L""))
|
||||
{
|
||||
swprintf_s(args, L"%s %s", args, cmderTerminalArgs.c_str());
|
||||
swprintf_s(args, L"%s %s", args, cmderConEmuArgs.c_str());
|
||||
}
|
||||
|
||||
// The `/run` arg and its value MUST be the last arg of ConEmu
|
||||
// see : https://conemu.github.io/en/ConEmuArgs.html
|
||||
// > This must be the last used switch (excepting -new_console and -cur_console)
|
||||
PathCombine(initCmd, vendorDir, L"init.bat");
|
||||
PathCombine(initPowerShell, vendorDir, L"profile.ps1");
|
||||
PathCombine(initBash, vendorDir, L"start_git_bash.cmd");
|
||||
PathCombine(initMintty, vendorDir, L"start_git_mintty.cmd");
|
||||
|
||||
if (!streqi(cmderTask.c_str(), L""))
|
||||
{
|
||||
if (PathFileExists(windowsTerminalDir)) {
|
||||
swprintf_s(args, L"%s -p \"%s\"", args, cmderTask.c_str());
|
||||
}
|
||||
else if (PathFileExists(conEmuDir))
|
||||
{
|
||||
swprintf_s(args, L"%s /run {%s}", args, cmderTask.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
if (streqi(cmderTask.c_str(), L"powershell"))
|
||||
{
|
||||
swprintf_s(args, L"%s -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command \"Invoke-Expression 'Import-Module ''%s'''\"", args, initPowerShell);
|
||||
}
|
||||
else if (streqi(cmderTask.c_str(), L"bash"))
|
||||
{
|
||||
swprintf_s(args, L"%s /c \"%s\"", args, initBash);
|
||||
}
|
||||
else if (streqi(cmderTask.c_str(), L"mintty"))
|
||||
{
|
||||
swprintf_s(args, L"%s /c \"%s\"", args, initMintty);
|
||||
}
|
||||
else if (streqi(cmderTask.c_str(), L"cmder"))
|
||||
{
|
||||
swprintf_s(args, L"%s /k \"%s\"", args, initCmd);
|
||||
}
|
||||
}
|
||||
swprintf_s(args, L"%s /run {%s}", args, cmderTask.c_str());
|
||||
}
|
||||
|
||||
SetEnvironmentVariable(L"CMDER_ROOT", exeDir);
|
||||
@@ -625,52 +455,18 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
|
||||
SetEnvironmentVariable(L"CMDER_USER_BIN", userBinDirPath);
|
||||
}
|
||||
|
||||
// Try to find m'intty.exe' so ConEmu can launch using %MINTTY_EXE% in external Git for Cmder Mini.
|
||||
// See: https://github.com/Maximus5/ConEmu/issues/2559 for why this is commented.
|
||||
|
||||
/*
|
||||
if (PathFileExists(vendoredGit))
|
||||
{
|
||||
PathCombine(minTTYPath, vendoredGit, L"usr\\bin\\mintty.exe");
|
||||
SetEnvironmentVariable(L"MINTTY_EXE", minTTYPath);
|
||||
}
|
||||
else if (PathFileExists(amdx64Git))
|
||||
{
|
||||
PathCombine(minTTYPath, amdx64Git, L"usr\\bin\\mintty.exe");
|
||||
SetEnvironmentVariable(L"MINTTY_EXE", minTTYPath);
|
||||
}
|
||||
else if (PathFileExists(x86Git))
|
||||
{
|
||||
PathCombine(minTTYPath, x86Git, L"usr\\bin\\mintty.exe");
|
||||
SetEnvironmentVariable(L"MINTTY_EXE", minTTYPath);
|
||||
}
|
||||
*/
|
||||
|
||||
// Ensure EnvironmentVariables are propagated.
|
||||
|
||||
STARTUPINFO si = { 0 };
|
||||
|
||||
si.cb = sizeof(STARTUPINFO);
|
||||
#if USE_TASKBAR_API
|
||||
si.lpTitle = appId;
|
||||
si.dwFlags = STARTF_TITLEISAPPID;
|
||||
#endif
|
||||
#if USE_TASKBAR_API
|
||||
si.lpTitle = appId;
|
||||
si.dwFlags = STARTF_TITLEISAPPID;
|
||||
#endif
|
||||
PROCESS_INFORMATION pi;
|
||||
|
||||
if (!CreateProcess(terminalPath, args, NULL, NULL, false, 0, NULL, NULL, &si, &pi))
|
||||
{
|
||||
if (PathFileExists(windowsTerminalDir))
|
||||
{
|
||||
MessageBox(NULL, _T("Unable to create the Windows Terminal process!"), _T("Error"), MB_OK);
|
||||
}
|
||||
else if (PathFileExists(conEmuDir))
|
||||
{
|
||||
MessageBox(NULL, _T("Unable to create the ConEmu process!"), _T("Error"), MB_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox(NULL, _T("Unable to create the Cmd process!"), _T("Error"), MB_OK);
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -725,11 +521,11 @@ void RegisterShellMenu(std::wstring opt, wchar_t* keyBaseName, std::wstring cfgR
|
||||
|
||||
wchar_t commandStr[MAX_PATH + 20] = { 0 };
|
||||
wchar_t baseCommandStr[MAX_PATH + 20] = { 0 };
|
||||
if (single) {
|
||||
swprintf_s(baseCommandStr, L"\"%s\" /single", exePath);
|
||||
if (!single) {
|
||||
swprintf_s(baseCommandStr, L"\"%s\"", exePath);
|
||||
}
|
||||
else {
|
||||
swprintf_s(baseCommandStr, L"\"%s\"", exePath);
|
||||
swprintf_s(baseCommandStr, L"\"%s\" /single", exePath);
|
||||
}
|
||||
|
||||
if (cfgRoot.length() == 0) // '/c [path]' was NOT specified
|
||||
@@ -787,7 +583,7 @@ struct cmderOptions
|
||||
std::wstring cmderTitle = L"Cmder";
|
||||
std::wstring cmderIcon = L"";
|
||||
std::wstring cmderRegScope = L"USER";
|
||||
std::wstring cmderTerminalArgs = L"";
|
||||
std::wstring cmderConEmuArgs = L"";
|
||||
bool cmderSingle = false;
|
||||
bool cmderUserCfg = true;
|
||||
bool registerApp = false;
|
||||
@@ -801,22 +597,11 @@ cmderOptions GetOption()
|
||||
LPWSTR *szArgList;
|
||||
int argCount;
|
||||
|
||||
wchar_t windowsTerminalDir[MAX_PATH] = { 0 };
|
||||
wchar_t conEmuDir[MAX_PATH] = { 0 };
|
||||
wchar_t vendorDir[MAX_PATH] = { 0 };
|
||||
wchar_t exeDir[MAX_PATH] = { 0 };
|
||||
|
||||
GetModuleFileName(NULL, exeDir, sizeof(exeDir));
|
||||
PathRemoveFileSpec(exeDir);
|
||||
|
||||
PathCombine(vendorDir, exeDir, L"vendor");
|
||||
PathCombine(windowsTerminalDir, vendorDir, L"windows-terminal");
|
||||
PathCombine(conEmuDir, vendorDir, L"ConEmu-Maximus5");
|
||||
|
||||
szArgList = CommandLineToArgvW(GetCommandLine(), &argCount);
|
||||
|
||||
for (int i = 1; i < argCount; i++)
|
||||
{
|
||||
|
||||
// MessageBox(NULL, szArgList[i], L"Arglist contents", MB_OK);
|
||||
if (cmderOptions.error == false) {
|
||||
if (_wcsicmp(L"/c", szArgList[i]) == 0)
|
||||
@@ -853,26 +638,26 @@ cmderOptions GetOption()
|
||||
MessageBox(NULL, szArgList[i + 1], L"/START - Folder does not exist!", MB_OK);
|
||||
}
|
||||
}
|
||||
else if (_wcsicmp(L"/task", szArgList[i]) == 0 || PathFileExists(windowsTerminalDir) || PathFileExists(conEmuDir))
|
||||
else if (_wcsicmp(L"/task", szArgList[i]) == 0)
|
||||
{
|
||||
cmderOptions.cmderTask = szArgList[i + 1];
|
||||
i++;
|
||||
}
|
||||
else if (_wcsicmp(L"/title", szArgList[i]) == 0 && !PathFileExists(windowsTerminalDir) && PathFileExists(conEmuDir))
|
||||
else if (_wcsicmp(L"/title", szArgList[i]) == 0)
|
||||
{
|
||||
cmderOptions.cmderTitle = szArgList[i + 1];
|
||||
i++;
|
||||
}
|
||||
else if (_wcsicmp(L"/icon", szArgList[i]) == 0 && !PathFileExists(windowsTerminalDir) && PathFileExists(conEmuDir))
|
||||
else if (_wcsicmp(L"/icon", szArgList[i]) == 0)
|
||||
{
|
||||
cmderOptions.cmderIcon = szArgList[i + 1];
|
||||
i++;
|
||||
}
|
||||
else if (_wcsicmp(L"/single", szArgList[i]) == 0 && !PathFileExists(windowsTerminalDir) && PathFileExists(conEmuDir))
|
||||
else if (_wcsicmp(L"/single", szArgList[i]) == 0)
|
||||
{
|
||||
cmderOptions.cmderSingle = true;
|
||||
}
|
||||
else if (_wcsicmp(L"/m", szArgList[i]) == 0 && !PathFileExists(windowsTerminalDir) && PathFileExists(conEmuDir))
|
||||
else if (_wcsicmp(L"/m", szArgList[i]) == 0)
|
||||
{
|
||||
cmderOptions.cmderUserCfg = false;
|
||||
}
|
||||
@@ -905,7 +690,7 @@ cmderOptions GetOption()
|
||||
/* Used for passing arguments to conemu prog */
|
||||
else if (_wcsicmp(L"/x", szArgList[i]) == 0)
|
||||
{
|
||||
cmderOptions.cmderTerminalArgs = szArgList[i + 1];
|
||||
cmderOptions.cmderConEmuArgs = szArgList[i + 1];
|
||||
i++;
|
||||
}
|
||||
/* Bare double dash, remaining commandline is for conemu */
|
||||
@@ -915,7 +700,7 @@ cmderOptions GetOption()
|
||||
auto doubledash = cmdline.find(L" -- ");
|
||||
if (doubledash != std::string::npos)
|
||||
{
|
||||
cmderOptions.cmderTerminalArgs = cmdline.substr(doubledash + 4);
|
||||
cmderOptions.cmderConEmuArgs = cmdline.substr(doubledash + 4);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -942,11 +727,7 @@ cmderOptions GetOption()
|
||||
cmderOptions.error = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!PathFileExists(windowsTerminalDir) && !PathFileExists(conEmuDir) && streqi(cmderOptions.cmderTask.c_str(), L""))
|
||||
{
|
||||
cmderOptions.cmderTask = L"cmder";
|
||||
}
|
||||
|
||||
if (cmderOptions.error == true)
|
||||
@@ -975,29 +756,12 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
|
||||
|
||||
cmderOptions cmderOptions = GetOption();
|
||||
|
||||
wchar_t windowsTerminalDir[MAX_PATH] = { 0 };
|
||||
wchar_t exeDir[MAX_PATH] = { 0 };
|
||||
|
||||
GetModuleFileName(NULL, exeDir, sizeof(exeDir));
|
||||
PathRemoveFileSpec(exeDir);
|
||||
PathCombine(windowsTerminalDir, exeDir, L"vendor\\windows-terminal");
|
||||
|
||||
if (cmderOptions.registerApp == true)
|
||||
{
|
||||
if (PathFileExists(windowsTerminalDir))
|
||||
{
|
||||
RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_PATH_BACKGROUND, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle);
|
||||
RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_PATH_LISTITEM, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle);
|
||||
RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_DRIVE_PATH_BACKGROUND, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle);
|
||||
RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_DRIVE_PATH_LISTITEM, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle);
|
||||
}
|
||||
else
|
||||
{
|
||||
RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_PATH_BACKGROUND, cmderOptions.cmderCfgRoot, false);
|
||||
RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_PATH_LISTITEM, cmderOptions.cmderCfgRoot, false);
|
||||
RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_DRIVE_PATH_BACKGROUND, cmderOptions.cmderCfgRoot, false);
|
||||
RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_DRIVE_PATH_LISTITEM, cmderOptions.cmderCfgRoot, false);
|
||||
}
|
||||
RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_PATH_BACKGROUND, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle);
|
||||
RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_PATH_LISTITEM, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle);
|
||||
RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_DRIVE_PATH_BACKGROUND, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle);
|
||||
RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_DRIVE_PATH_LISTITEM, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle);
|
||||
}
|
||||
else if (cmderOptions.unRegisterApp == true)
|
||||
{
|
||||
@@ -1012,8 +776,8 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
|
||||
}
|
||||
else
|
||||
{
|
||||
StartCmder(cmderOptions.cmderStart, cmderOptions.cmderSingle, cmderOptions.cmderTask, cmderOptions.cmderTitle, cmderOptions.cmderIcon, cmderOptions.cmderCfgRoot, cmderOptions.cmderUserCfg, cmderOptions.cmderTerminalArgs);
|
||||
StartCmder(cmderOptions.cmderStart, cmderOptions.cmderSingle, cmderOptions.cmderTask, cmderOptions.cmderTitle, cmderOptions.cmderIcon, cmderOptions.cmderCfgRoot, cmderOptions.cmderUserCfg, cmderOptions.cmderConEmuArgs);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,19 +35,19 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""winres.h""\r\n"
|
||||
"\0"
|
||||
"#include ""winres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
@@ -60,7 +60,7 @@ END
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDI_CMDER ICON "..\\..\\icons\\cmder.ico"
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
#endif // English (United States) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -6,7 +6,7 @@ STRINGTABLE
|
||||
{
|
||||
IDS_TITLE "Cmder Launcher"
|
||||
|
||||
IDS_SWITCHES L"Valid options:\n\n /c [CMDER User Root Path]\n /task [Windows Terminal Profile/ConEmu Task Name]\n /icon [CMDER Icon Path] - ConEmu ONLY!\n [/start [Start in Path] | [Start in Path]]\n /single - ConEmu ONLY!\n /m\n -- [ConEmu/Windows Terminal extra arguments]\n\nNote: '-- [...]' must be the last argument!\n\nor, either:\n /register [USER | ALL]\n /unregister [USER | ALL]"
|
||||
IDS_SWITCHES L"Valid options:\n\n /c [CMDER User Root Path]\n /task [ConEmu Task Name]\n /icon [CMDER Icon Path]\n [/start [Start in Path] | [Start in Path]]\n /single\n /m\n /x [ConEmu extra arguments]\n\nor, either:\n /register [USER | ALL]\n /unregister [USER | ALL]"
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -23,6 +23,5 @@ appveyor.yml
|
||||
vendor\cmder.sh
|
||||
vendor\git-prompt.sh
|
||||
config\user-*
|
||||
config\user_*
|
||||
clink_history*
|
||||
*.log
|
||||
|
||||
@@ -56,9 +56,6 @@ Param(
|
||||
# Using this option will skip all downloads, if you only need to build launcher
|
||||
[switch]$noVendor,
|
||||
|
||||
# Using this option will specify the emulator to use [none, all, conemu-maximus5, or windows-terminal]
|
||||
[string]$terminal = 'all',
|
||||
|
||||
# Build launcher if you have MSBuild tools installed
|
||||
[switch]$Compile
|
||||
)
|
||||
@@ -116,36 +113,15 @@ if (-not $noVendor) {
|
||||
}
|
||||
else { $ConEmuXml = "" }
|
||||
|
||||
# Preserve modified (by user) Windows Terminal setting file
|
||||
if ($config -ne "") {
|
||||
$WinTermSettingsJson = Join-Path $saveTo "windows-terminal\settings\settings.json"
|
||||
if (Test-Path $WinTermSettingsJson -pathType leaf) {
|
||||
$WinTermSettingsJsonSave = Join-Path $config "windows_terminal_settings.json"
|
||||
Write-Verbose "Backup '$WinTermSettingsJson' to '$WinTermSettingsJsonSave'"
|
||||
Copy-Item $WinTermSettingsJson $WinTermSettingsJsonSave
|
||||
}
|
||||
else { $WinTermSettingsJson = "" }
|
||||
}
|
||||
else { $WinTermSettingsJson = "" }
|
||||
|
||||
# Kill ssh-agent.exe if it is running from the $env:cmder_root we are building
|
||||
$cmder_folder = $cmder_root.toString()
|
||||
foreach ($ssh_agent in $(Get-Process ssh-agent -ErrorAction SilentlyContinue)) {
|
||||
if ([string]$($ssh_agent.path) -Match $cmder_folder.Replace('\', '\\')) {
|
||||
if ([string]$($ssh_agent.path) -Match [string]$cmder_root.replace('\', '\\')) {
|
||||
Write-Verbose $("Stopping " + $ssh_agent.path + "!")
|
||||
Stop-Process $ssh_agent.id
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($s in $sources) {
|
||||
if ($terminal -eq "none") {
|
||||
continue
|
||||
} elseif ($s.name -eq "conemu-maximus5" -and $terminal -eq "windows-terminal") {
|
||||
continue
|
||||
} elseif ($s.name -eq "windows-terminal" -and $terminal -eq "conemu-maximus5") {
|
||||
continue
|
||||
}
|
||||
|
||||
Write-Verbose "Getting vendored $($s.name) $($s.version)..."
|
||||
|
||||
# We do not care about the extensions/type of archive
|
||||
@@ -156,16 +132,6 @@ if (-not $noVendor) {
|
||||
Download-File -Url $s.url -File $vend\$tempArchive -ErrorAction Stop
|
||||
Extract-Archive $tempArchive $s.name
|
||||
|
||||
# Make Embedded Windows Terminal Portable
|
||||
if ($s.name -eq "windows-terminal") {
|
||||
$windowTerminalFiles = resolve-path ($saveTo + "\" + $s.name + "\terminal*")
|
||||
Move-Item -ErrorAction SilentlyContinue $windowTerminalFiles\* $s.name >$null
|
||||
Remove-Item -ErrorAction SilentlyContinue $windowTerminalFiles >$null
|
||||
Write-Verbose "Making Windows Terminal Portable..."
|
||||
New-Item -Type Directory -Path (Join-Path $saveTo "/windows-terminal/settings") -ErrorAction SilentlyContinue >$null
|
||||
New-Item -Type File -Path (Join-Path $saveTo "/windows-terminal/.portable") -ErrorAction SilentlyContinue >$null
|
||||
}
|
||||
|
||||
if ((Get-ChildItem $s.name).Count -eq 1) {
|
||||
Flatten-Directory($s.name)
|
||||
}
|
||||
@@ -180,12 +146,6 @@ if (-not $noVendor) {
|
||||
Copy-Item $ConEmuXmlSave $ConEmuXml
|
||||
}
|
||||
|
||||
# Restore Windows Terminal user configuration
|
||||
if ($WinTermSettingsJson -ne "") {
|
||||
Write-Verbose "Restore '$WinTermSettingsJsonSave' to '$WinTermSettingsJson'"
|
||||
Copy-Item $WinTermSettingsJsonSave $WinTermSettingsJson
|
||||
}
|
||||
|
||||
# Put vendor\cmder.sh in /etc/profile.d so it runs when we start bash or mintty
|
||||
if ( (Test-Path $($saveTo + "git-for-windows/etc/profile.d") ) ) {
|
||||
Write-Verbose "Adding cmder.sh /etc/profile.d"
|
||||
|
||||
@@ -31,9 +31,6 @@ Param(
|
||||
# Path to the vendor configuration source file
|
||||
[string]$cmderRoot = "$PSScriptRoot\..",
|
||||
|
||||
# Using this option will pack artifacts for a specific included terminal emulator [none, all, conemu-maximus5, or windows-terminal]
|
||||
[string]$terminal = 'all',
|
||||
|
||||
# Vendor folder locaton
|
||||
[string]$saveTo = "$PSScriptRoot\..\build"
|
||||
)
|
||||
@@ -44,36 +41,10 @@ $cmderRoot = Resolve-Path $cmderRoot
|
||||
$ErrorActionPreference = "Stop"
|
||||
Ensure-Executable "7z"
|
||||
|
||||
if ($terminal -eq "none") {
|
||||
$targets = @{
|
||||
"cmder_win.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on -xr!`"vendor\conemu-maximus5`" -xr!`"vendor\windows-terminal`"";
|
||||
"cmder_win.zip" = "-mm=Deflate -mfb=128 -mpass=3 -xr!`"vendor\conemu-maximus5`" -xr!`"vendor\windows-terminal`"";
|
||||
"cmder_win.mini.zip" = "-xr!`"vendor\git-for-windows`" -xr!`"vendor\conemu-maximus5`" -xr!`"vendor\windows-terminal`"";
|
||||
}
|
||||
} elseif ($terminal -eq "windows-terminal") {
|
||||
$targets = @{
|
||||
"cmder_wt.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on -xr!`"vendor\conemu-maximus5`"";
|
||||
"cmder_wt.zip" = "-mm=Deflate -mfb=128 -mpass=3 -xr!`"vendor\conemu-maximus5`"";
|
||||
"cmder_wt_mini.zip" = "-xr!`"vendor\git-for-windows`" -xr!`"vendor\conemu-maximus5`"";
|
||||
}
|
||||
} elseif ($terminal -eq "windows-terminal") {
|
||||
$targets = @{
|
||||
"cmder.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on -xr!`"vendor\windows-terminal`"";
|
||||
"cmder.zip" = "-mm=Deflate -mfb=128 -mpass=3 -xr!`"vendor\windows-terminal`"";
|
||||
"cmder_mini.zip" = "-xr!`"vendor\git-for-windows`" -xr!`"vendor\windows-terminal`"";
|
||||
}
|
||||
} else {
|
||||
$targets = @{
|
||||
"cmder_win.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on -xr!`"vendor\conemu-maximus5`" -xr!`"vendor\windows-terminal`"";
|
||||
"cmder_win.zip" = "-mm=Deflate -mfb=128 -mpass=3 -xr!`"vendor\conemu-maximus5`" -xr!`"vendor\windows-terminal`"";
|
||||
"cmder_win_mini.zip" = "-xr!`"vendor\git-for-windows`" -xr!`"vendor\conemu-maximus5`" -xr!`"vendor\windows-terminal`"";
|
||||
"cmder_wt.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on -xr!`"vendor\conemu-maximus5`"";
|
||||
"cmder_wt.zip" = "-mm=Deflate -mfb=128 -mpass=3 -xr!`"vendor\conemu-maximus5`"";
|
||||
"cmder_wt_mini.zip" = "-xr!`"vendor\git-for-windows`" -xr!`"vendor\conemu-maximus5`"";
|
||||
"cmder.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on -xr!`"vendor\windows-terminal`"";
|
||||
"cmder.zip" = "-mm=Deflate -mfb=128 -mpass=3 -xr!`"vendor\windows-terminal`"";
|
||||
"cmder_mini.zip" = "-xr!`"vendor\git-for-windows`" -xr!`"vendor\windows-terminal`"";
|
||||
}
|
||||
$targets = @{
|
||||
"cmder.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on";
|
||||
"cmder.zip" = "-mm=Deflate -mfb=128 -mpass=3";
|
||||
"cmder_mini.zip" = "-xr!`"vendor\git-for-windows`"";
|
||||
}
|
||||
|
||||
Push-Location -Path $cmderRoot
|
||||
|
||||
@@ -32,11 +32,7 @@ Param(
|
||||
# -whatif switch to not actually make changes
|
||||
|
||||
# Path to the vendor configuration source file
|
||||
[string]$sourcesPath = "$PSScriptRoot\..\vendor\sources.json",
|
||||
|
||||
# Include pre-release versions (RC, beta, alpha, etc.)
|
||||
# By default, only stable releases are considered
|
||||
[switch]$IncludePrerelease = $false
|
||||
[string]$sourcesPath = "$PSScriptRoot\..\vendor\sources.json"
|
||||
)
|
||||
|
||||
# Get the root directory of the cmder project.
|
||||
@@ -83,39 +79,11 @@ function Match-Filenames {
|
||||
return $position
|
||||
}
|
||||
|
||||
# Checks if a release is a pre-release based on GitHub API flag and version tag keywords
|
||||
# Pre-release keywords include: -rc (release candidate), -beta, -alpha, -preview, -pre
|
||||
function Test-IsPrerelease {
|
||||
param (
|
||||
[Parameter(Mandatory = $true)]
|
||||
$release
|
||||
)
|
||||
|
||||
# Check if marked as pre-release by GitHub
|
||||
if ($release.prerelease -eq $true) {
|
||||
return $true
|
||||
}
|
||||
|
||||
# Check for common pre-release keywords in tag name
|
||||
# This catches versions like v2.50.0-rc, v1.0.0-beta, v1.0.0-alpha, etc.
|
||||
$prereleaseKeywords = @('-rc', '-beta', '-alpha', '-preview', '-pre')
|
||||
foreach ($keyword in $prereleaseKeywords) {
|
||||
if ($release.tag_name -ilike "*$keyword*") {
|
||||
return $true
|
||||
}
|
||||
}
|
||||
|
||||
return $false
|
||||
}
|
||||
|
||||
# Uses the GitHub api in order to fetch the current download links for the latest releases of the repo.
|
||||
function Fetch-DownloadUrl {
|
||||
param (
|
||||
[Parameter(Mandatory = $true)]
|
||||
$urlStr,
|
||||
|
||||
[Parameter(Mandatory = $false)]
|
||||
[bool]$includePrerelease = $false
|
||||
$urlStr
|
||||
)
|
||||
|
||||
$url = [uri] $urlStr
|
||||
@@ -159,13 +127,6 @@ function Fetch-DownloadUrl {
|
||||
}
|
||||
|
||||
:loop foreach ($i in $info) {
|
||||
# Skip pre-release versions unless explicitly included
|
||||
# Pre-releases include RC (Release Candidate), beta, alpha, and other test versions
|
||||
if (-not $includePrerelease -and (Test-IsPrerelease $i)) {
|
||||
Write-Verbose "Skipping pre-release version: $($i.tag_name)"
|
||||
continue
|
||||
}
|
||||
|
||||
if (-not ($i.assets -is [array])) {
|
||||
continue
|
||||
}
|
||||
@@ -203,26 +164,12 @@ function Fetch-DownloadUrl {
|
||||
|
||||
# Special case for archive downloads of repository
|
||||
if (($null -eq $downloadLinks) -or (-not $downloadLinks)) {
|
||||
if ((($p | ForEach-Object { $_.Trim('/') }) -contains "archive")) {
|
||||
# Find the first release that matches our pre-release filtering criteria
|
||||
$selectedRelease = $null
|
||||
foreach ($release in $info) {
|
||||
# Apply the same filtering logic
|
||||
if (-not $includePrerelease -and (Test-IsPrerelease $release)) {
|
||||
continue
|
||||
}
|
||||
# Use the first release that passes the filter
|
||||
$selectedRelease = $release
|
||||
break
|
||||
}
|
||||
|
||||
if ($selectedRelease -and $selectedRelease.tag_name) {
|
||||
for ($i = 0; $i -lt $p.Length; $i++) {
|
||||
if ($p[$i].Trim('/') -eq "archive") {
|
||||
$p[$i + 1] = $selectedRelease.tag_name + ".zip"
|
||||
$downloadLinks = $url.Scheme + "://" + $url.Host + ($p -join '')
|
||||
return $downloadLinks
|
||||
}
|
||||
if ((($p | ForEach-Object { $_.Trim('/') }) -contains "archive") -and $info[0].tag_name) {
|
||||
for ($i = 0; $i -lt $p.Length; $i++) {
|
||||
if ($p[$i].Trim('/') -eq "archive") {
|
||||
$p[$i + 1] = $info[0].tag_name + ".zip"
|
||||
$downloadLinks = $url.Scheme + "://" + $url.Host + ($p -join '')
|
||||
return $downloadLinks
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -268,7 +215,7 @@ foreach ($s in $sources) {
|
||||
|
||||
Write-Verbose "Old Link: $($s.url)"
|
||||
|
||||
$downloadUrl = Fetch-DownloadUrl $s.url -includePrerelease $IncludePrerelease
|
||||
$downloadUrl = Fetch-DownloadUrl $s.url
|
||||
|
||||
if (($null -eq $downloadUrl) -or ($downloadUrl -eq '')) {
|
||||
Write-Verbose "No new links were found"
|
||||
|
||||
131
vendor/ConEmu.xml.default
vendored
131
vendor/ConEmu.xml.default
vendored
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<key name="Software">
|
||||
<key name="ConEmu">
|
||||
<key name=".Vanilla" modified="2023-06-05 13:14:44" build="221218">
|
||||
<key name=".Vanilla" modified="2018-02-22 06:02:11" build="171109">
|
||||
<value name="ColorTable00" type="dword" data="00222827"/>
|
||||
<value name="ColorTable01" type="dword" data="009e5401"/>
|
||||
<value name="ColorTable02" type="dword" data="0004aa74"/>
|
||||
@@ -42,8 +42,8 @@
|
||||
<value name="PopBackColorIdx" type="hex" data="10"/>
|
||||
<value name="ExtendFonts" type="hex" data="00"/>
|
||||
<value name="ExtendFontNormalIdx" type="hex" data="01"/>
|
||||
<value name="ExtendFontBoldIdx" type="hex" data="0C"/>
|
||||
<value name="ExtendFontItalicIdx" type="hex" data="0D"/>
|
||||
<value name="ExtendFontBoldIdx" type="hex" data="0c"/>
|
||||
<value name="ExtendFontItalicIdx" type="hex" data="0d"/>
|
||||
<value name="CursorTypeActive" type="dword" data="000232c1"/>
|
||||
<value name="CursorTypeInactive" type="dword" data="00823282"/>
|
||||
<value name="ClipboardDetectLineEnd" type="hex" data="01"/>
|
||||
@@ -58,7 +58,7 @@
|
||||
<value name="TrueColorerSupport" type="hex" data="01"/>
|
||||
<value name="FadeInactive" type="hex" data="01"/>
|
||||
<value name="FadeInactiveLow" type="hex" data="00"/>
|
||||
<value name="FadeInactiveHigh" type="hex" data="C8"/>
|
||||
<value name="FadeInactiveHigh" type="hex" data="c8"/>
|
||||
<value name="ComSpec.UncPaths" type="hex" data="01"/>
|
||||
<value name="ConVisible" type="hex" data="00"/>
|
||||
<value name="ConInMode" type="dword" data="ffffffff"/>
|
||||
@@ -78,6 +78,7 @@
|
||||
<value name="StartFarEditors" type="hex" data="00"/>
|
||||
<value name="StoreTaskbarkTasks" type="hex" data="00"/>
|
||||
<value name="StoreTaskbarCommands" type="hex" data="00"/>
|
||||
<value name="CmdLineHistory" type="multi"></value>
|
||||
<value name="SingleInstance" type="hex" data="00"/>
|
||||
<value name="ShowHelpTooltips" type="hex" data="01"/>
|
||||
<value name="Multi" type="hex" data="01"/>
|
||||
@@ -112,13 +113,13 @@
|
||||
<value name="Monospace" type="hex" data="01"/>
|
||||
<value name="BackGround Image show" type="hex" data="00"/>
|
||||
<value name="BackGround Image" type="string" data="c:\back.bmp"/>
|
||||
<value name="bgImageDarker" type="hex" data="FF"/>
|
||||
<value name="bgImageDarker" type="hex" data="ff"/>
|
||||
<value name="bgImageColors" type="dword" data="ffffffff"/>
|
||||
<value name="bgOperation" type="hex" data="00"/>
|
||||
<value name="bgPluginAllowed" type="hex" data="01"/>
|
||||
<value name="AlphaValue" type="hex" data="F8"/>
|
||||
<value name="AlphaValue" type="hex" data="f8"/>
|
||||
<value name="AlphaValueSeparate" type="hex" data="01"/>
|
||||
<value name="AlphaValueInactive" type="hex" data="EE"/>
|
||||
<value name="AlphaValueInactive" type="hex" data="ee"/>
|
||||
<value name="UserScreenTransparent" type="hex" data="00"/>
|
||||
<value name="ColorKeyTransparent" type="hex" data="00"/>
|
||||
<value name="ColorKeyValue" type="dword" data="00010101"/>
|
||||
@@ -127,8 +128,8 @@
|
||||
<value name="ConWnd Width" type="dword" data="00000078"/>
|
||||
<value name="ConWnd Height" type="dword" data="0000001e"/>
|
||||
<value name="Cascaded" type="hex" data="01"/>
|
||||
<value name="ConWnd X" type="long" data="2194"/>
|
||||
<value name="ConWnd Y" type="long" data="95"/>
|
||||
<value name="ConWnd X" type="long" data="500"/>
|
||||
<value name="ConWnd Y" type="long" data="500"/>
|
||||
<value name="16bit Height" type="ulong" data="0"/>
|
||||
<value name="AutoSaveSizePos" type="hex" data="01"/>
|
||||
<value name="IntegralSize" type="hex" data="00"/>
|
||||
@@ -165,19 +166,19 @@
|
||||
<value name="CTS.ActMode" type="hex" data="02"/>
|
||||
<value name="CTS.RBtnAction" type="hex" data="03"/>
|
||||
<value name="CTS.MBtnAction" type="hex" data="00"/>
|
||||
<value name="CTS.ColorIndex" type="hex" data="E0"/>
|
||||
<value name="CTS.ColorIndex" type="hex" data="e0"/>
|
||||
<value name="ClipboardConfirmEnter" type="hex" data="01"/>
|
||||
<value name="ClipboardConfirmLonger" type="ulong" data="200"/>
|
||||
<value name="FarGotoEditorOpt" type="hex" data="01"/>
|
||||
<value name="FarGotoEditorPath" type="string" data='far.exe /e%1:%2 "%3"'/>
|
||||
<value name="FarGotoEditorPath" type="string" data="far.exe /e%1:%2 "%3""/>
|
||||
<value name="FixFarBorders" type="hex" data="01"/>
|
||||
<value name="FixFarBordersRanges" type="string" data="2013-25C4;"/>
|
||||
<value name="ExtendUCharMap" type="hex" data="01"/>
|
||||
<value name="EnhanceGraphics" type="hex" data="01"/>
|
||||
<value name="EnhanceButtons" type="hex" data="00"/>
|
||||
<value name="PartBrush75" type="hex" data="C8"/>
|
||||
<value name="PartBrush75" type="hex" data="c8"/>
|
||||
<value name="PartBrush50" type="hex" data="96"/>
|
||||
<value name="PartBrush25" type="hex" data="5A"/>
|
||||
<value name="PartBrush25" type="hex" data="5a"/>
|
||||
<value name="PartBrushBlack" type="hex" data="20"/>
|
||||
<value name="RightClick opens context menu" type="hex" data="02"/>
|
||||
<value name="RightClickMacro2" type="string" data=""/>
|
||||
@@ -412,15 +413,15 @@
|
||||
<value name="Key.TileToLeft" type="dword" data="80808000"/>
|
||||
<value name="Key.TileToRIght" type="dword" data="80808000"/>
|
||||
<value name="KeyMacro01" type="dword" data="0012a031"/>
|
||||
<value name="KeyMacro01.Text" type="string" data='Task("cmd")'/>
|
||||
<value name="KeyMacro01.Text" type="string" data="Task("cmd")"/>
|
||||
<value name="KeyMacro02" type="dword" data="0012a032"/>
|
||||
<value name="KeyMacro02.Text" type="string" data='Task("PowerShell")'/>
|
||||
<value name="KeyMacro02.Text" type="string" data="Task("PowerShell")"/>
|
||||
<value name="KeyMacro03" type="dword" data="000011d0"/>
|
||||
<value name="KeyMacro03.Text" type="string" data="FontSetSize(1,2)"/>
|
||||
<value name="KeyMacro04" type="dword" data="000011d1"/>
|
||||
<value name="KeyMacro04.Text" type="string" data="FontSetSize(1,-2)"/>
|
||||
<value name="KeyMacro05" type="dword" data="0012a033"/>
|
||||
<value name="KeyMacro05.Text" type="string" data='Task("PowerShell as Admin")'/>
|
||||
<value name="KeyMacro05.Text" type="string" data="Task("PowerShell as Admin")"/>
|
||||
<value name="KeyMacro06" type="dword" data="00000000"/>
|
||||
<value name="KeyMacro06.Text" type="string" data=""/>
|
||||
<value name="KeyMacro07" type="dword" data="00000000"/>
|
||||
@@ -483,12 +484,12 @@
|
||||
<value name="DndLKey" type="hex" data="00"/>
|
||||
<value name="DndRKey" type="hex" data="a2"/>
|
||||
<value name="WndDragKey" type="dword" data="00121101"/>
|
||||
<key name="Tasks" modified="2023-06-05 13:14:44" build="221218">
|
||||
<value name="Count" type="long" data="11"/>
|
||||
<key name="Tasks" modified="2018-02-22 06:02:12" build="171109">
|
||||
<value name="Count" type="long" data="9"/>
|
||||
<key name="Task1" modified="2018-02-22 06:02:12" build="171109">
|
||||
<value name="Name" type="string" data="{cmd::Cmder as Admin}"/>
|
||||
<value name="GuiArgs" type="string" data=' /icon "%CMDER_ROOT%\icons\cmder.ico"'/>
|
||||
<value name="Cmd1" type="string" data='*cmd /k ""%ConEmuDir%\..\init.bat" "'/>
|
||||
<value name="GuiArgs" type="string" data=" /icon "%CMDER_ROOT%\icons\cmder.ico""/>
|
||||
<value name="Cmd1" type="string" data="*cmd /k ""%ConEmuDir%\..\init.bat" ""/>
|
||||
<value name="Active" type="long" data="0"/>
|
||||
<value name="Count" type="long" data="1"/>
|
||||
<value name="Hotkey" type="dword" data="00000000"/>
|
||||
@@ -496,8 +497,8 @@
|
||||
</key>
|
||||
<key name="Task2" modified="2018-02-22 06:05:13" build="171109">
|
||||
<value name="Name" type="string" data="{cmd::Cmder}"/>
|
||||
<value name="GuiArgs" type="string" data=' /icon "%CMDER_ROOT%\icons\cmder.ico"'/>
|
||||
<value name="Cmd1" type="string" data='cmd /k ""%ConEmuDir%\..\init.bat" "'/>
|
||||
<value name="GuiArgs" type="string" data=" /icon "%CMDER_ROOT%\icons\cmder.ico""/>
|
||||
<value name="Cmd1" type="string" data="cmd /k ""%ConEmuDir%\..\init.bat" ""/>
|
||||
<value name="Active" type="long" data="0"/>
|
||||
<value name="Count" type="long" data="1"/>
|
||||
<value name="Hotkey" type="dword" data="00000000"/>
|
||||
@@ -506,8 +507,8 @@
|
||||
<key name="Task3" modified="2018-02-22 06:05:13" build="171109">
|
||||
<value name="Name" type="string" data="{PowerShell::PowerShell as Admin}"/>
|
||||
<value name="Hotkey" type="dword" data="00000000"/>
|
||||
<value name="GuiArgs" type="string" data=' /icon "%CMDER_ROOT%\icons\cmder.ico"'/>
|
||||
<value name="Cmd1" type="string" data='*PowerShell -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command "Invoke-Expression 'Import-Module ''%ConEmuDir%\..\profile.ps1'''"'/>
|
||||
<value name="GuiArgs" type="string" data=" /icon "%CMDER_ROOT%\icons\cmder.ico""/>
|
||||
<value name="Cmd1" type="string" data="*PowerShell -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command "Invoke-Expression 'Import-Module ''%ConEmuDir%\..\profile.ps1'''""/>
|
||||
<value name="Active" type="long" data="0"/>
|
||||
<value name="Count" type="long" data="1"/>
|
||||
<value name="Flags" type="dword" data="00000000"/>
|
||||
@@ -515,78 +516,61 @@
|
||||
<key name="Task4" modified="2018-02-22 06:05:13" build="171109">
|
||||
<value name="Name" type="string" data="{PowerShell::PowerShell}"/>
|
||||
<value name="Hotkey" type="dword" data="00000000"/>
|
||||
<value name="GuiArgs" type="string" data=' /icon "%CMDER_ROOT%\icons\cmder.ico"'/>
|
||||
<value name="Cmd1" type="string" data='PowerShell -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command "Invoke-Expression 'Import-Module ''%ConEmuDir%\..\profile.ps1'''"'/>
|
||||
<value name="Cmd2" type="string" data='"%CMDER_ROOT%\vendor\git-for-windows\git-bash.exe"'/>
|
||||
<value name="GuiArgs" type="string" data=" /icon "%CMDER_ROOT%\icons\cmder.ico""/>
|
||||
<value name="Cmd1" type="string" data="PowerShell -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command "Invoke-Expression 'Import-Module ''%ConEmuDir%\..\profile.ps1'''""/>
|
||||
<value name="Cmd2" type="string" data=""%CMDER_ROOT%\vendor\git-for-windows\git-bash.exe""/>
|
||||
<value name="Active" type="long" data="0"/>
|
||||
<value name="Count" type="long" data="1"/>
|
||||
<value name="Flags" type="dword" data="00000000"/>
|
||||
</key>
|
||||
<key name="Task5" modified="2023-06-05 13:15:18" build="221218">
|
||||
<value name="Name" type="string" data="{bash::mintty as Admin - External}"/>
|
||||
<value name="Flags" type="dword" data="00000004"/>
|
||||
<value name="Hotkey" type="dword" data="00000000"/>
|
||||
<value name="GuiArgs" type="string" data='/icon "%ProgramFiles%\git\usr\share\git\git-for-windows.ico"'/>
|
||||
<value name="Cmd1" type="string" data='*"%ProgramFiles%\git\usr\bin\mintty.exe" /bin/bash -l'/>
|
||||
<value name="Active" type="long" data="0"/>
|
||||
<value name="Count" type="long" data="1"/>
|
||||
</key>
|
||||
<key name="Task6" modified="2023-06-05 13:15:38" build="221218">
|
||||
<value name="Name" type="string" data="{bash::mintty - External}"/>
|
||||
<value name="Flags" type="dword" data="00000004"/>
|
||||
<value name="Hotkey" type="dword" data="00000000"/>
|
||||
<value name="GuiArgs" type="string" data='/icon "%ProgramFiles%\git\usr\share\git\git-for-windows.ico"'/>
|
||||
<value name="Cmd1" type="string" data='"%ProgramFiles%\git\usr\bin\mintty.exe" /bin/bash -l'/>
|
||||
<value name="Active" type="long" data="0"/>
|
||||
<value name="Count" type="long" data="1"/>
|
||||
<value name="Cmd2" type="string" data='"%CMDER_ROOT%vendor\git-for-windows\usr\bin\mintty.exe" /bin/bash -l'/>
|
||||
</key>
|
||||
<key name="Task7" modified="2023-06-05 13:15:38" build="221218">
|
||||
<key name="Task5" modified="2018-02-22 06:05:13" build="171109">
|
||||
<value name="Name" type="string" data="{bash::mintty as Admin}"/>
|
||||
<value name="Flags" type="dword" data="00000000"/>
|
||||
<value name="Hotkey" type="dword" data="00000000"/>
|
||||
<value name="GuiArgs" type="string" data='/icon "%ConEmuDir%\..\git-for-windows\usr\share\git\git-for-windows.ico"'/>
|
||||
<value name="GuiArgs" type="string" data="/icon "%ConEmuDir%\..\git-for-windows\usr\share\git\git-for-windows.ico""/>
|
||||
<value name="Cmd1" type="string" data="*"%ConEmuDir%\..\git-for-windows\usr\bin\mintty.exe" /bin/bash -l"/>
|
||||
<value name="Active" type="long" data="0"/>
|
||||
<value name="Count" type="long" data="1"/>
|
||||
<value name="Cmd1" type="string" data='*"%ConEmuDir%\..\git-for-windows\usr\bin\mintty.exe" /bin/bash -l'/>
|
||||
</key>
|
||||
<key name="Task8" modified="2023-06-05 13:15:18" build="221218">
|
||||
<key name="Task6" modified="2018-02-22 06:05:13" build="171109">
|
||||
<value name="Name" type="string" data="{bash::mintty}"/>
|
||||
<value name="Flags" type="dword" data="00000000"/>
|
||||
<value name="Hotkey" type="dword" data="00000000"/>
|
||||
<value name="GuiArgs" type="string" data='/icon "%ConEmuDir%\..\git-for-windows\usr\share\git\git-for-windows.ico"'/>
|
||||
<value name="Cmd1" type="string" data='"%ConEmuDir%\..\git-for-windows\usr\bin\mintty.exe" /bin/bash -l'/>
|
||||
<value name="GuiArgs" type="string" data="/icon "%ConEmuDir%\..\git-for-windows\usr\share\git\git-for-windows.ico""/>
|
||||
<value name="Cmd1" type="string" data=""%ConEmuDir%\..\git-for-windows\usr\bin\mintty.exe" /bin/bash -l"/>
|
||||
<value name="Active" type="long" data="0"/>
|
||||
<value name="Count" type="long" data="1"/>
|
||||
<value name="Cmd2" type="string" data=""%CMDER_ROOT%vendor\git-for-windows\usr\bin\mintty.exe" /bin/bash -l"/>
|
||||
</key>
|
||||
<key name="Task9" modified="2023-06-05 13:14:44" build="221218">
|
||||
<key name="Task7" modified="2018-02-22 06:05:13" build="171109">
|
||||
<value name="Name" type="string" data="{bash::bash as Admin}"/>
|
||||
<value name="Flags" type="dword" data="00000000"/>
|
||||
<value name="Hotkey" type="dword" data="00000000"/>
|
||||
<value name="GuiArgs" type="string" data=' /icon "%CMDER_ROOT%\icons\cmder.ico"'/>
|
||||
<value name="Cmd1" type="string" data='*cmd /c "%ConEmuDir%\..\start_git_bash.cmd"'/>
|
||||
<value name="GuiArgs" type="string" data=" /icon "%CMDER_ROOT%\icons\cmder.ico""/>
|
||||
<value name="Active" type="long" data="0"/>
|
||||
<value name="Count" type="long" data="1"/>
|
||||
<value name="Cmd1" type="string" data="*set "PATH=%ConEmuDir%\..\git-for-windows\usr\bin;%PATH%" & %ConEmuDir%\..\git-for-windows\git-cmd.exe --no-cd --command=%ConEmuBaseDirShort%\conemu-msys2-64.exe "%ConEmuDir%\..\git-for-windows\usr\bin\bash.exe" --login -i"/>
|
||||
</key>
|
||||
<key name="Task10" modified="2023-06-05 13:14:44" build="221218">
|
||||
<key name="Task8" modified="2018-02-22 06:05:13" build="171109">
|
||||
<value name="Name" type="string" data="{bash::bash}"/>
|
||||
<value name="Flags" type="dword" data="00000000"/>
|
||||
<value name="Hotkey" type="dword" data="00000000"/>
|
||||
<value name="GuiArgs" type="string" data=' /icon "%CMDER_ROOT%\icons\cmder.ico"'/>
|
||||
<value name="GuiArgs" type="string" data=" /icon "%CMDER_ROOT%\icons\cmder.ico""/>
|
||||
<value name="Cmd1" type="string" data="set "PATH=%ConEmuDir%\..\git-for-windows\usr\bin;%PATH%" & %ConEmuDir%\..\git-for-windows\git-cmd.exe --no-cd --command=%ConEmuBaseDirShort%\conemu-msys2-64.exe "%ConEmuDir%\..\git-for-windows\usr\bin\bash.exe" --login -i"/>
|
||||
<value name="Active" type="long" data="0"/>
|
||||
<value name="Count" type="long" data="1"/>
|
||||
<value name="Cmd1" type="string" data='cmd /c "%ConEmuDir%\..\start_git_bash.cmd"'/>
|
||||
</key>
|
||||
<key name="Task11" modified="2023-06-05 13:14:44" build="221218">
|
||||
<key name="Task9" modified="2018-03-23 23:26:53" build="180318">
|
||||
<value name="Name" type="string" data="{WSL::bash}"/>
|
||||
<value name="Flags" type="dword" data="00000000"/>
|
||||
<value name="Hotkey" type="dword" data="00000000"/>
|
||||
<value name="GuiArgs" type="string" data='-icon "%USERPROFILE%\AppData\Local\lxss\bash.ico"'/>
|
||||
<value name="Cmd1" type="string" data='set "PATH=%ConEmuBaseDirShort%\wsl;%PATH%" & %ConEmuBaseDirShort%\conemu-cyg-64.exe --wsl -cur_console:pm:/mnt'/>
|
||||
<value name="Active" type="long" data="0"/>
|
||||
<value name="Count" type="long" data="1"/>
|
||||
<value name="Cmd1" type="string" data='set "PATH=%ConEmuBaseDirShort%\wsl;%PATH%" & %ConEmuBaseDirShort%\conemu-cyg-64.exe --wsl -cur_console:pm:/mnt'/>
|
||||
</key>
|
||||
</key>
|
||||
|
||||
<key name="Apps" modified="2018-02-22 06:05:13" build="171109">
|
||||
<value name="Count" type="long" data="0"/>
|
||||
</key>
|
||||
@@ -692,7 +676,7 @@
|
||||
<value name="StatusBar.Hide.Dpi" type="hex" data="01"/>
|
||||
<value name="TabFlashChanged" type="long" data="8"/>
|
||||
<value name="TabModifiedSuffix" type="string" data="[*]"/>
|
||||
<key name="HotKeys" modified="2023-06-05 13:14:44" build="221218">
|
||||
<key name="HotKeys" modified="2018-02-22 06:02:12" build="171109">
|
||||
<value name="KeyMacroVersion" type="hex" data="02"/>
|
||||
<value name="Multi.Modifier" type="dword" data="00000011"/>
|
||||
<value name="Multi.ArrowsModifier" type="dword" data="0000005b"/>
|
||||
@@ -861,13 +845,13 @@
|
||||
<value name="KeyMacro31.Text" type="string" data=""/>
|
||||
<value name="KeyMacro32" type="dword" data="00000000"/>
|
||||
<value name="KeyMacro32.Text" type="string" data=""/>
|
||||
<value name="CTS.VkBlock" type="hex" data="A4"/>
|
||||
<value name="CTS.VkText" type="hex" data="A0"/>
|
||||
<value name="CTS.VkBlock" type="hex" data="a4"/>
|
||||
<value name="CTS.VkText" type="hex" data="a0"/>
|
||||
<value name="CTS.VkAct" type="hex" data="00"/>
|
||||
<value name="CTS.VkPrompt" type="hex" data="00"/>
|
||||
<value name="FarGotoEditorVk" type="hex" data="A2"/>
|
||||
<value name="FarGotoEditorVk" type="hex" data="a2"/>
|
||||
<value name="DndLKey" type="hex" data="00"/>
|
||||
<value name="DndRKey" type="hex" data="A2"/>
|
||||
<value name="DndRKey" type="hex" data="a2"/>
|
||||
<value name="WndDragKey" type="dword" data="00121101"/>
|
||||
<value name="Multi.Unfasten" type="dword" data="00000000"/>
|
||||
<value name="Key.DebugProcess" type="dword" data="00105b44"/>
|
||||
@@ -885,16 +869,10 @@
|
||||
<value name="Key.BufPrUp" type="dword" data="00121121"/>
|
||||
<value name="Key.BufPrDn" type="dword" data="00121122"/>
|
||||
<value name="Key.ResetTerm" type="dword" data="00000000"/>
|
||||
<value name="SetFocusParent" type="dword" data="0000a01b"/>
|
||||
<value name="CheckUpdates" type="dword" data="00105b55"/>
|
||||
<value name="Multi.NewWndConfirm" type="dword" data="00000000"/>
|
||||
<value name="CloseToRightKey" type="dword" data="00000000"/>
|
||||
<value name="Key.EditMenu" type="dword" data="00000000"/>
|
||||
<value name="Key.EditMenu2" type="dword" data="00000000"/>
|
||||
</key>
|
||||
<value name="StartCreateDelay" type="ulong" data="100"/>
|
||||
<value name="DefaultTerminalDebugLog" type="hex" data="00"/>
|
||||
<value name="LastMonitor" type="string" data="1680,0,3600,1050"/>
|
||||
<value name="LastMonitor" type="string" data="0,0,1440,1050"/>
|
||||
<value name="Restore2ActiveMon" type="hex" data="00"/>
|
||||
<value name="DownShowExOnTopMessage" type="hex" data="00"/>
|
||||
<value name="EnvironmentSet" type="multi">
|
||||
@@ -924,15 +902,6 @@
|
||||
<value name="StatusBar.Hide.TMode" type="hex" data="01"/>
|
||||
<value name="StatusBar.Hide.RMode" type="hex" data="01"/>
|
||||
<value name="StatusBar.Hide.CellI" type="hex" data="01"/>
|
||||
<value name="Language" type="string" data="en"/>
|
||||
<value name="AnsiLogCodes" type="hex" data="00"/>
|
||||
<value name="ResetTerminalConfirm" type="hex" data="01"/>
|
||||
<value name="RestoreInactive" type="hex" data="00"/>
|
||||
<value name="AutoReloadEnvironment" type="hex" data="01"/>
|
||||
<value name="AutoTrimSingleLine" type="hex" data="00"/>
|
||||
<value name="StatusBar.Hide.InputGrouping" type="hex" data="00"/>
|
||||
<value name="StatusBar.Hide.WMode" type="hex" data="01"/>
|
||||
</key>
|
||||
</key>
|
||||
</key>
|
||||
|
||||
|
||||
4
vendor/bin/cmder_diag.cmd
vendored
4
vendor/bin/cmder_diag.cmd
vendored
@@ -2,9 +2,9 @@
|
||||
|
||||
(echo.
|
||||
echo ------------------------------------
|
||||
echo Get Cmder env variables...
|
||||
echo set
|
||||
echo ------------------------------------
|
||||
set | findstr -i -r "^aliases= architecture_bits ccall= cexec= ^clink_ ^cmder ^debug_output= fast_init= ^GIT_INSTALL_ROOT= ^git_locale= ^HOME= ^max_depth= ^nix_tools= ^path_position= ^path= ^PLINK_PROTOCOL= ^print_ ^SVN_SSH= ^time_init= ^user_aliases= ^verbose_output="
|
||||
set
|
||||
|
||||
echo.
|
||||
echo ------------------------------------
|
||||
|
||||
3
vendor/bin/create-cmdercfg.cmd
vendored
3
vendor/bin/create-cmdercfg.cmd
vendored
@@ -1,3 +0,0 @@
|
||||
@echo off
|
||||
|
||||
powershell -executionpolicy bypass -f "%cmder_root%\vendor\bin\create-cmdercfg.ps1" -shell cmd -outfile "%CMDER_CONFIG_DIR%\user_init.cmd"
|
||||
30
vendor/bin/create-cmdercfg.ps1
vendored
30
vendor/bin/create-cmdercfg.ps1
vendored
@@ -1,30 +0,0 @@
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter()]
|
||||
[string]$shell = 'cmd',
|
||||
[string]$outfile = "$env:cmder_config_dir\user_init.cmd"
|
||||
)
|
||||
|
||||
if ($shell -match 'powershell') {
|
||||
write-host "'$shell' is not supported at this time!"
|
||||
exit 0
|
||||
} elseif ($shell -match 'bash') {
|
||||
write-host "'$shell' is not supported at this time!"
|
||||
exit 0
|
||||
} elseif ($shell -notMatch 'cmd') {
|
||||
exit 0
|
||||
}
|
||||
|
||||
$CmderModulePath = Join-path $env:cmder_root "vendor/psmodules/"
|
||||
$CmderFunctions = Join-Path $CmderModulePath "Cmder.ps1"
|
||||
|
||||
. $CmderFunctions
|
||||
|
||||
if ($shell -match 'cmd') {
|
||||
write-host "Generating Cmder Config for '$shell' shell in '$outfile'..."
|
||||
templateExpand "$env:cmder_root\vendor\user_init.cmd.template" "$outfile"
|
||||
} elseif ($shell -match 'powershell') {
|
||||
write-host "'$shell' is not supported at this time!"
|
||||
} elseif ($shell -match 'bash') {
|
||||
write-host "'$shell' is not supported at this time!"
|
||||
}
|
||||
24
vendor/bin/timer.cmd
vendored
24
vendor/bin/timer.cmd
vendored
@@ -11,7 +11,6 @@ set /a hours=%end_h%-%start_h%
|
||||
set /a mins=%end_m%-%start_m%
|
||||
set /a secs=%end_s%-%start_s%
|
||||
set /a ms=%end_ms%-%start_ms%
|
||||
|
||||
if %ms% lss 0 set /a secs = %secs% - 1 & set /a ms = 100%ms%
|
||||
if %secs% lss 0 set /a mins = %mins% - 1 & set /a secs = 60%secs%
|
||||
if %mins% lss 0 set /a hours = %hours% - 1 & set /a mins = 60%mins%
|
||||
@@ -21,26 +20,3 @@ if 1%ms% lss 100 set ms=0%ms%
|
||||
:: Mission accomplished
|
||||
set /a totalsecs = %hours%*3600 + %mins%*60 + %secs%
|
||||
echo Elapsed Time: %hours%:%mins%:%secs%.%ms% (%totalsecs%.%ms%s total)
|
||||
|
||||
:: cleanup
|
||||
set start=
|
||||
set end=
|
||||
set options=
|
||||
|
||||
set start_h=
|
||||
set start_m=
|
||||
set start_s=
|
||||
set start_ms=
|
||||
|
||||
set end_h=
|
||||
set end_m=
|
||||
set end_s=
|
||||
set end_ms=
|
||||
|
||||
set hours=
|
||||
set mins=
|
||||
set secs=
|
||||
set ms=
|
||||
|
||||
set totalsecs=
|
||||
|
||||
|
||||
158
vendor/clink.lua
vendored
158
vendor/clink.lua
vendored
@@ -7,7 +7,7 @@
|
||||
-- luacheck: globals uah_color cwd_color lamb_color clean_color dirty_color conflict_color unknown_color
|
||||
-- luacheck: globals prompt_homeSymbol prompt_lambSymbol prompt_type prompt_useHomeSymbol prompt_useUserAtHost
|
||||
-- luacheck: globals prompt_singleLine prompt_includeVersionControl
|
||||
-- luacheck: globals prompt_overrideGitStatusOptIn
|
||||
-- luacheck: globals prompt_overrideGitStatusOptIn prompt_overrideSvnStatusOptIn
|
||||
-- luacheck: globals clink io.popenyield os.isdir settings.get
|
||||
|
||||
-- At first, load the original clink.lua file
|
||||
@@ -350,8 +350,13 @@ end
|
||||
-- @return {false|mercurial branch information}
|
||||
---
|
||||
local function get_hg_branch()
|
||||
-- Return the branch information.
|
||||
local file = io.popen("hg branch 2>nul")
|
||||
-- Return the branch information. The default is to get just the
|
||||
-- branch name, but you could e.g. use the "hg-prompt" extension to
|
||||
-- get more information, such as any applied mq patches. Here's an
|
||||
-- example of that:
|
||||
-- local cmd = "hg prompt \"{branch}{status}{|{patch}}{update}\""
|
||||
local cmd = "hg branch 2>nul"
|
||||
local file = io.popen(cmd)
|
||||
if not file then
|
||||
return false
|
||||
end
|
||||
@@ -419,33 +424,12 @@ local function get_git_status()
|
||||
return { status = is_status, conflict = conflict_found }
|
||||
end
|
||||
|
||||
---
|
||||
-- Get the status of working dir
|
||||
-- @return {bool}
|
||||
---
|
||||
local function get_hg_status()
|
||||
-- The default is to just use the branch name, but you could e.g. use the
|
||||
-- "hg-prompt" extension to get more information, such as any applied mq
|
||||
-- patches. Here's an example of that:
|
||||
-- "hg prompt \"{branch}{status}{|{patch}}{update}\""
|
||||
local pipe = io_popenyield("hg status -amrd 2>&1")
|
||||
if not pipe then
|
||||
return { error = true }
|
||||
end
|
||||
|
||||
local output = pipe:read('*all')
|
||||
pipe:close()
|
||||
|
||||
local dirty = (output ~= nil and output ~= "")
|
||||
return { clean = not dirty }
|
||||
end
|
||||
|
||||
---
|
||||
-- Get the status of working dir
|
||||
-- @return {bool}
|
||||
---
|
||||
local function get_svn_status()
|
||||
local file = io_popenyield("svn status -q 2>nul")
|
||||
local file = io_popenyield("svn status -q")
|
||||
if not file then
|
||||
return { error = true }
|
||||
end
|
||||
@@ -536,6 +520,14 @@ local function git_prompt_filter()
|
||||
return false
|
||||
end
|
||||
|
||||
-- Colors for git status
|
||||
local colors = {
|
||||
clean = get_clean_color(),
|
||||
dirty = get_dirty_color(),
|
||||
conflict = get_conflict_color(),
|
||||
nostatus = get_unknown_color()
|
||||
}
|
||||
|
||||
local git_dir = get_git_dir()
|
||||
local color
|
||||
if git_dir then
|
||||
@@ -555,19 +547,18 @@ local function git_prompt_filter()
|
||||
local gitConflict = gitInfo.conflict
|
||||
|
||||
if gitStatus == nil then
|
||||
color = get_unknown_color()
|
||||
color = colors.nostatus
|
||||
elseif gitStatus then
|
||||
color = get_clean_color()
|
||||
color = colors.clean
|
||||
else
|
||||
color = get_dirty_color()
|
||||
color = colors.dirty
|
||||
end
|
||||
|
||||
if gitConflict then
|
||||
color = get_conflict_color()
|
||||
color = colors.conflict
|
||||
end
|
||||
|
||||
local result = " "..color.."("..branch..")"
|
||||
clink.prompt.value = gsub_plain(clink.prompt.value, "{git}", result)
|
||||
clink.prompt.value = gsub_plain(clink.prompt.value, "{git}", " "..color.."("..branch..")")
|
||||
return false
|
||||
end
|
||||
end
|
||||
@@ -577,18 +568,6 @@ local function git_prompt_filter()
|
||||
return false
|
||||
end
|
||||
|
||||
local function get_hg_info_table()
|
||||
local info = clink_promptcoroutine(function ()
|
||||
return get_hg_status() or {}
|
||||
end)
|
||||
if not info then
|
||||
info = cached_info.hg_info or {}
|
||||
else
|
||||
cached_info.hg_info = info
|
||||
end
|
||||
return info
|
||||
end
|
||||
|
||||
local function hg_prompt_filter()
|
||||
|
||||
-- Don't do any hg processing if the prompt doesn't want to show hg info.
|
||||
@@ -598,30 +577,33 @@ local function hg_prompt_filter()
|
||||
|
||||
local hg_dir = get_hg_dir()
|
||||
if hg_dir then
|
||||
local branch = get_hg_branch()
|
||||
if branch and
|
||||
-- Colors for mercurial status
|
||||
local colors = {
|
||||
clean = get_clean_color(),
|
||||
dirty = get_dirty_color(),
|
||||
nostatus = get_unknown_color()
|
||||
}
|
||||
local output = get_hg_branch()
|
||||
|
||||
-- strip the trailing newline from the branch name
|
||||
local n = #output
|
||||
while n > 0 and output:find("^%s", n) do n = n - 1 end
|
||||
local branch = output:sub(1, n)
|
||||
|
||||
if branch ~= nil and
|
||||
string.sub(branch,1,7) ~= "abort: " and -- not an HG working copy
|
||||
(not string.find(branch, "is not recognized")) then -- 'hg' not in path
|
||||
-- If in a different repo or branch than last time, discard cached info
|
||||
if cached_info.hg_dir ~= hg_dir or cached_info.hg_branch ~= branch then
|
||||
cached_info.hg_info = nil
|
||||
cached_info.hg_dir = hg_dir
|
||||
cached_info.hg_branch = branch
|
||||
local color = colors.clean
|
||||
|
||||
local pipe = io.popen("hg status -amrd 2>&1")
|
||||
if pipe then
|
||||
output = pipe:read('*all')
|
||||
pipe:close()
|
||||
if output ~= nil and output ~= "" then color = colors.dirty end
|
||||
end
|
||||
|
||||
local hgInfo = get_hg_info_table()
|
||||
|
||||
local color
|
||||
if not hgInfo or hgInfo.error then
|
||||
color = get_unknown_color()
|
||||
elseif hgInfo.clean then
|
||||
color = get_clean_color()
|
||||
else
|
||||
color = get_dirty_color()
|
||||
end
|
||||
|
||||
local result = " "..color.."("..branch..")"
|
||||
clink.prompt.value = gsub_plain(clink.prompt.value, "{hg}", result)
|
||||
local result = color .. "(" .. branch .. ")"
|
||||
clink.prompt.value = gsub_plain(clink.prompt.value, "{hg}", " "..result)
|
||||
return false
|
||||
end
|
||||
end
|
||||
@@ -630,18 +612,6 @@ local function hg_prompt_filter()
|
||||
clink.prompt.value = gsub_plain(clink.prompt.value, "{hg}", "")
|
||||
end
|
||||
|
||||
local function get_svn_info_table()
|
||||
local info = clink_promptcoroutine(function ()
|
||||
return get_svn_status() or {}
|
||||
end)
|
||||
if not info then
|
||||
info = cached_info.svn_info or {}
|
||||
else
|
||||
cached_info.svn_info = info
|
||||
end
|
||||
return info
|
||||
end
|
||||
|
||||
local function svn_prompt_filter()
|
||||
|
||||
-- Don't do any svn processing if the prompt doesn't want to show svn info.
|
||||
@@ -649,6 +619,13 @@ local function svn_prompt_filter()
|
||||
return false
|
||||
end
|
||||
|
||||
-- Colors for svn status
|
||||
local colors = {
|
||||
clean = get_clean_color(),
|
||||
dirty = get_dirty_color(),
|
||||
nostatus = get_unknown_color()
|
||||
}
|
||||
|
||||
local svn_dir = get_svn_dir()
|
||||
if svn_dir then
|
||||
-- if we're inside of svn repo then try to detect current branch
|
||||
@@ -660,16 +637,29 @@ local function svn_prompt_filter()
|
||||
cached_info.svn_dir = svn_dir
|
||||
cached_info.svn_branch = branch
|
||||
end
|
||||
|
||||
local svnInfo = get_svn_info_table()
|
||||
-- Get the svn status using coroutine if available and option is enabled. Otherwise use a blocking call
|
||||
local svnStatus
|
||||
if clink.promptcoroutine and io.popenyield and settings.get("prompt.async") and prompt_overrideSvnStatusOptIn then -- luacheck: no max line length
|
||||
svnStatus = clink_promptcoroutine(function ()
|
||||
return get_svn_status()
|
||||
end)
|
||||
-- If the status result is pending, use the cached version instead, otherwise store it to the cache
|
||||
if svnStatus == nil then
|
||||
svnStatus = cached_info.svn_info
|
||||
else
|
||||
cached_info.svn_info = svnStatus
|
||||
end
|
||||
else
|
||||
svnStatus = get_svn_status()
|
||||
end
|
||||
|
||||
local color
|
||||
if not svnInfo or svnInfo.error then
|
||||
color = get_unknown_color()
|
||||
elseif svnInfo.clean then
|
||||
color = get_clean_color()
|
||||
if not svnStatus or svnStatus.error then
|
||||
color = colors.nostatus
|
||||
elseif svnStatus.clean then
|
||||
color = colors.clean
|
||||
else
|
||||
color = get_dirty_color()
|
||||
color = colors.dirty
|
||||
end
|
||||
|
||||
clink.prompt.value = gsub_plain(clink.prompt.value, "{svn}", " "..color.."("..branch..")")
|
||||
@@ -702,10 +692,6 @@ for _,lua_module in ipairs(clink.find_files(completions_dir..'*.lua')) do
|
||||
end
|
||||
end
|
||||
|
||||
-- If Cmder is launched with '/c [folderPath]', indicating Cmder is installed globally and
|
||||
-- each user has a private '[folderPath]\config' folder, Clink won't know about the global
|
||||
-- '%cmder_root%\config dir, so we need to load scripts from there before . Clink loads lua
|
||||
-- scripts from the profile directory given to it when it was injected.
|
||||
if clink.get_env('CMDER_USER_CONFIG') then
|
||||
local cmder_config_dir = clink.get_env('CMDER_ROOT')..'/config/'
|
||||
for _,lua_module in ipairs(clink.find_files(cmder_config_dir..'*.lua')) do
|
||||
|
||||
6
vendor/cmder.sh
vendored
6
vendor/cmder.sh
vendored
@@ -22,11 +22,7 @@ function runProfiled {
|
||||
}
|
||||
|
||||
# We do this for bash as admin sessions since $CMDER_ROOT is not being set
|
||||
if [ -z "$CMDER_ROOT" ] && [ -n "$cmder_root" ] ; then
|
||||
export CMDER_ROOT=$(cygpath -u $cmder_root)
|
||||
fi
|
||||
|
||||
if [ -z "$CMDER_ROOT" ] ; then
|
||||
if [ "$CMDER_ROOT" == "" ] ; then
|
||||
case "$ConEmuDir" in *\\*) CMDER_ROOT=$( cd "$(cygpath -u "$ConEmuDir")/../.." ; pwd );; esac
|
||||
else
|
||||
case "$CMDER_ROOT" in *\\*) CMDER_ROOT="$(cygpath -u "$CMDER_ROOT")";; esac
|
||||
|
||||
19
vendor/cmder_exinit
vendored
19
vendor/cmder_exinit
vendored
@@ -26,14 +26,15 @@ function runProfiled {
|
||||
unset profile_d_scripts
|
||||
pushd "${1}" >/dev/null
|
||||
|
||||
if [ -n "${ZSH_VERSION}" ]; then
|
||||
if [ ! "x${ZSH_VERSION}" = "x" ]; then
|
||||
profile_d_scripts=$(ls *.zsh 2>/dev/null)
|
||||
elif [ -n "${BASH_VERSION}" ]; then
|
||||
elif [ ! "x${BASH_VERSION}" = "x" ]; then
|
||||
profile_d_scripts=$(ls *.sh 2>/dev/null)
|
||||
fi
|
||||
|
||||
if [ -n "${profile_d_scripts}" ] ; then
|
||||
if [ ! "x${profile_d_scripts}" = "x" ] ; then
|
||||
for x in ${profile_d_scripts} ; do
|
||||
echo Sourcing "${1}/${x}"...
|
||||
. "${1}/${x}"
|
||||
done
|
||||
fi
|
||||
@@ -43,23 +44,23 @@ function runProfiled {
|
||||
# Check that we haven't already been sourced.
|
||||
[[ -z ${CMDER_EXINIT} ]] && CMDER_EXINIT="1" || return
|
||||
|
||||
if [ -z "$CMDER_ROOT" ] && [ -n "$cmder_root" ] ; then
|
||||
export CMDER_ROOT=$(cygpath -u $cmder_root)
|
||||
fi
|
||||
|
||||
# We do this for bash as admin sessions since $CMDER_ROOT is not being set
|
||||
if [ "$CMDER_ROOT" = "" -a "$ConEmuDir" != "" ] ; then
|
||||
if [ -d "${ConEmuDir}/../../vendor" ] ; then
|
||||
if [ -d "${ConEmuDir}../../vendor" ] ; then
|
||||
case "$ConEmuDir" in *\\*) CMDER_ROOT=$( cd "$(cygpath -u "$ConEmuDir")/../.." ; pwd );; esac
|
||||
else
|
||||
echo "Running in ConEmu without Cmder, skipping Cmder integration."
|
||||
fi
|
||||
elif [ "$CMDER_ROOT" != "" ] ; then
|
||||
case "$CMDER_ROOT" in *\\*) CMDER_ROOT="$(cygpath -u "$CMDER_ROOT")";; esac
|
||||
fi
|
||||
|
||||
if [ -n "$CMDER_ROOT" ] ; then
|
||||
if [ ! "$CMDER_ROOT" = "" ] ; then
|
||||
# Remove any trailing '/'
|
||||
CMDER_ROOT=$(echo $CMDER_ROOT | sed 's:/*$::')
|
||||
|
||||
echo "Using \"CMDER_ROOT\" at \"${CMDER_ROOT}\"."
|
||||
|
||||
export CMDER_ROOT
|
||||
|
||||
PATH=${CMDER_ROOT}/bin:${CMDER_ROOT}/vendor/bin:$PATH:${CMDER_ROOT}
|
||||
|
||||
5
vendor/cmder_prompt_config.lua.default
vendored
5
vendor/cmder_prompt_config.lua.default
vendored
@@ -38,6 +38,11 @@ prompt_includeVersionControl = true
|
||||
-- NOTE: This only takes effect if using Clink v1.2.10 or higher.
|
||||
prompt_overrideGitStatusOptIn = false
|
||||
|
||||
-- OPTIONAL. If true then always ignore the cmder.status and cmder.cmdstatus svn config settings and run the svn prompt commands in the background.
|
||||
-- default is false
|
||||
-- NOTE: This only takes effect if using Clink v1.2.10 or higher.
|
||||
prompt_overrideSvnStatusOptIn = false
|
||||
|
||||
-- Prompt Attributes
|
||||
--
|
||||
-- Colors: https://github.com/cmderdev/cmder/wiki/Customization#list-of-colors
|
||||
|
||||
114
vendor/init.bat
vendored
114
vendor/init.bat
vendored
@@ -166,24 +166,9 @@ if "%PROCESSOR_ARCHITECTURE%"=="x86" (
|
||||
set CMDER_CLINK=0
|
||||
)
|
||||
|
||||
if defined CMDER_USER_CONFIG (
|
||||
if exist "%CMDER_ROOT%\config\user_init.cmd" (
|
||||
call "%CMDER_ROOT%\config\user_init.cmd"
|
||||
exit /b
|
||||
) else if exist "%CMDER_USER_CONFIG%\config\user_init.cmd" (
|
||||
call "%CMDER_USER_CONFIG%\config\user_init.cmd"
|
||||
exit /b
|
||||
)
|
||||
) else if exist "%CMDER_ROOT%\config\user_init.cmd" (
|
||||
call "%CMDER_ROOT%\config\user_init.cmd"
|
||||
exit /b
|
||||
)
|
||||
|
||||
if "%CMDER_CLINK%" == "1" (
|
||||
REM TODO: Detect if clink is already injected, if so goto :CLINK_FINISH
|
||||
goto :INJECT_CLINK
|
||||
) else if "%CMDER_CLINK%" == "2" (
|
||||
goto :CLINK_FINISH
|
||||
)
|
||||
|
||||
goto :SKIP_CLINK
|
||||
@@ -220,7 +205,6 @@ goto :SKIP_CLINK
|
||||
)
|
||||
|
||||
"%CMDER_ROOT%\vendor\clink\clink_%clink_architecture%.exe" inject --quiet --profile "%CMDER_CONFIG_DIR%" --scripts "%CMDER_ROOT%\vendor"
|
||||
set CMDER_CLINK=2
|
||||
|
||||
:: Check if a fatal error occurred when trying to inject Clink
|
||||
if errorlevel 2 (
|
||||
@@ -315,7 +299,7 @@ if exist "%CMDER_ROOT%\vendor\git-for-windows" (
|
||||
)
|
||||
|
||||
:SPECIFIED_GIT
|
||||
%print_debug% init.bat "Using specified GIT_INSTALL_ROOT=%GIT_INSTALL_ROOT%...."
|
||||
%print_debug% init.bat "Using /GIT_INSTALL_ROOT..."
|
||||
goto :CONFIGURE_GIT
|
||||
|
||||
:FOUND_GIT
|
||||
@@ -324,13 +308,8 @@ goto :CONFIGURE_GIT
|
||||
|
||||
:CONFIGURE_GIT
|
||||
%print_debug% init.bat "Using Git from '%GIT_INSTALL_ROOT%..."
|
||||
|
||||
:: Add git to the path
|
||||
%print_debug% init.bat "START - git.exe(prepend): Env Var - PATH=%path%"
|
||||
if exist "%GIT_INSTALL_ROOT%\cmd\git.exe" (
|
||||
set "path=%GIT_INSTALL_ROOT%\cmd;%path%"
|
||||
)
|
||||
%print_debug% init.bat "END - git.exe(prepend): Env Var - PATH=%path%"
|
||||
if exist "%GIT_INSTALL_ROOT%\cmd\git.exe" %lib_path% enhance_path "%GIT_INSTALL_ROOT%\cmd" ""
|
||||
|
||||
:: Add the unix commands at the end to not shadow windows commands like `more` and `find`
|
||||
if %nix_tools% equ 1 (
|
||||
@@ -341,30 +320,16 @@ if %nix_tools% equ 1 (
|
||||
set "path_position="
|
||||
)
|
||||
|
||||
%print_debug% init.bat "START - nix_tools(%path_position%): Env Var - PATH=%path%"
|
||||
if %nix_tools% geq 1 (
|
||||
if exist "%GIT_INSTALL_ROOT%\mingw32" (
|
||||
if "%path_position%" == "append" (
|
||||
set "path=%path%;%GIT_INSTALL_ROOT%\mingw32\bin"
|
||||
) else (
|
||||
set "path=%GIT_INSTALL_ROOT%\mingw32\bin;%path%"
|
||||
)
|
||||
%lib_path% enhance_path "%GIT_INSTALL_ROOT%\mingw32\bin" %path_position%
|
||||
) else if exist "%GIT_INSTALL_ROOT%\mingw64" (
|
||||
if "%path_position%" == "append" (
|
||||
set "path=%path%;%GIT_INSTALL_ROOT%\mingw64\bin"
|
||||
) else (
|
||||
set "path=%GIT_INSTALL_ROOT%\mingw64\bin;%path%"
|
||||
)
|
||||
%lib_path% enhance_path "%GIT_INSTALL_ROOT%\mingw64\bin" %path_position%
|
||||
)
|
||||
if exist "%GIT_INSTALL_ROOT%\usr\bin" (
|
||||
if "%path_position%" == "append" (
|
||||
set "path=%path%;%GIT_INSTALL_ROOT%\usr\bin"
|
||||
) else (
|
||||
set "path=%GIT_INSTALL_ROOT%\usr\bin;%path%"
|
||||
)
|
||||
%lib_path% enhance_path "%GIT_INSTALL_ROOT%\usr\bin" %path_position%
|
||||
)
|
||||
)
|
||||
%print_debug% init.bat "END - nix_tools(%path_position%): Env Var - PATH=%path%"
|
||||
|
||||
:SET_ENV
|
||||
|
||||
@@ -390,14 +355,15 @@ setlocal enabledelayedexpansion
|
||||
if defined git_locale (
|
||||
REM %print_debug% init.bat "Env Var - git_locale=!git_locale!"
|
||||
if not defined LANG (
|
||||
for /F "delims=" %%F in ('"!git_locale!" -uU 2') do (
|
||||
for /F "delims=" %%F in ('!git_locale! -uU 2') do (
|
||||
set "LANG=%%F"
|
||||
)
|
||||
)
|
||||
)
|
||||
endlocal && set LANG=%LANG%
|
||||
|
||||
%print_debug% init.bat "Found Git in: 'GIT_INSTALL_ROOT=%GIT_INSTALL_ROOT%'"
|
||||
%print_debug% init.bat "Env Var - GIT_INSTALL_ROOT=%GIT_INSTALL_ROOT%"
|
||||
%print_debug% init.bat "Found Git in: '%GIT_INSTALL_ROOT%'"
|
||||
goto :PATH_ENHANCE
|
||||
|
||||
:NO_GIT
|
||||
@@ -405,32 +371,14 @@ goto :PATH_ENHANCE
|
||||
endlocal
|
||||
|
||||
:PATH_ENHANCE
|
||||
%print_debug% init.bat "START - vendor/bin(prepend): Env Var - PATH=%path%"
|
||||
set "path=%CMDER_ROOT%\vendor\bin;%path%"
|
||||
%print_debug% init.bat "END - vendor/bin(prepend): Env Var - PATH=%path%"
|
||||
%lib_path% enhance_path "%CMDER_ROOT%\vendor\bin"
|
||||
|
||||
:USER_CONFIG_START
|
||||
%print_debug% init.bat "START - bin(prepend): Env Var - PATH=%path%"
|
||||
if %max_depth% gtr 1 (
|
||||
%lib_path% enhance_path_recursive "%CMDER_ROOT%\bin" 0 %max_depth%
|
||||
) else (
|
||||
set "path=%CMDER_ROOT%\bin;%path%"
|
||||
)
|
||||
%print_debug% init.bat "END - bin(prepend): Env Var - PATH=%path%"
|
||||
|
||||
if defined CMDER_USER_BIN if defined CMDER_USER_ROOT (
|
||||
%print_debug% init.bat "START - user_bin(prepend): Env Var - PATH=%path%"
|
||||
if %max_depth% gtr 1 (
|
||||
%lib_path% enhance_path_recursive "%CMDER_ROOT%\bin" 0 %max_depth%
|
||||
if defined CMDER_USER_BIN (
|
||||
%lib_path% enhance_path_recursive "%CMDER_USER_BIN%" 0 %max_depth%
|
||||
) else (
|
||||
set "path=%CMDER_USER_ROOT%\bin;%path%"
|
||||
)
|
||||
%print_debug% init.bat "END - user_bin(prepend): Env Var - PATH=!path!"
|
||||
)
|
||||
|
||||
%print_debug% init.bat "START - cmder_root(append): Env Var - PATH=%path%"
|
||||
set "path=%path%;%CMDER_ROOT%"
|
||||
%print_debug% init.bat "END - cmder_root(append): Env Var - PATH=%path%"
|
||||
%lib_path% enhance_path "%CMDER_ROOT%" append
|
||||
|
||||
:: Drop *.bat and *.cmd files into "%CMDER_ROOT%\config\profile.d"
|
||||
:: to run them at startup.
|
||||
@@ -539,40 +487,12 @@ if "%CMDER_ALIASES%" == "1" if exist "%CMDER_ROOT%\bin\alias.bat" if exist "%CMD
|
||||
|
||||
set initialConfig=
|
||||
|
||||
if not exist "%CMDER_CONFIG_DIR%\user_init.cmd" (
|
||||
powershell -executionpolicy bypass -f "%cmder_root%\vendor\bin\create-cmdercfg.ps1" -shell cmd -outfile "%CMDER_CONFIG_DIR%\user_init.cmd"
|
||||
|
||||
if not exist "%CMDER_ROOT%\config\user_init.cmd" (
|
||||
%print_error% "Failed to generate Cmder config"
|
||||
)
|
||||
)
|
||||
|
||||
:CMDER_CONFIGURED
|
||||
if not defined CMDER_CONFIGURED set CMDER_CONFIGURED=1
|
||||
set CMDER_INIT_END=%time%
|
||||
if not defined CMDER_CONFIGURED set CMDER_CONFIGURED=1
|
||||
|
||||
if "%time_init%" == "1" if "%CMDER_INIT_END%" neq "" if "%CMDER_INIT_START%" neq "" (
|
||||
call "%cmder_root%\vendor\bin\timer.cmd" "%CMDER_INIT_START%" "%CMDER_INIT_END%"
|
||||
)
|
||||
|
||||
:CLEANUP
|
||||
set architecture_bits=
|
||||
set CMDER_ALIASES=
|
||||
set CMDER_INIT_END=
|
||||
set CMDER_INIT_START=
|
||||
set CMDER_USER_FLAGS=
|
||||
set CMDER_CLINK=
|
||||
set debug_output=
|
||||
set fast_init=
|
||||
set max_depth=
|
||||
set nix_tools=
|
||||
set path_position=
|
||||
set print_debug=
|
||||
set print_error=
|
||||
set print_verbose=
|
||||
set print_warning=
|
||||
set time_init=
|
||||
set verbose_output=
|
||||
set user_aliases=
|
||||
set CMDER_INIT_END=%time%
|
||||
|
||||
if %time_init% gtr 0 (
|
||||
"%cmder_root%\vendor\bin\timer.cmd" "%CMDER_INIT_START%" "%CMDER_INIT_END%"
|
||||
)
|
||||
exit /b
|
||||
|
||||
67
vendor/lib/lib_path.cmd
vendored
67
vendor/lib/lib_path.cmd
vendored
@@ -91,13 +91,13 @@ exit /b
|
||||
|
||||
if /i "!position!" == "append" (
|
||||
if "!found!" == "0" (
|
||||
echo "!PATH!"|!WINDIR!\System32\findstr >nul /I /R /C:";!find_query!\"$"
|
||||
echo "!PATH!"|!WINDIR!\System32\findstr >nul /I /R /C:";!find_query!$"
|
||||
call :set_found
|
||||
)
|
||||
%print_debug% :enhance_path "Env Var END PATH !find_query! - found=!found!"
|
||||
) else (
|
||||
if "!found!" == "0" (
|
||||
echo "!PATH!"|!WINDIR!\System32\findstr >nul /I /R /C:"^\"!find_query!;"
|
||||
echo "!PATH!"|!WINDIR!\System32\findstr >nul /I /R /C:"^!find_query!;"
|
||||
call :set_found
|
||||
)
|
||||
%print_debug% :enhance_path "Env Var BEGIN PATH !find_query! - found=!found!"
|
||||
@@ -157,12 +157,8 @@ exit /b
|
||||
exit /b
|
||||
|
||||
:enhance_path_recursive
|
||||
call :set_path_recursive "%~1" "%~2" "%~3"
|
||||
exit /b
|
||||
|
||||
:set_path_recursive
|
||||
:::===============================================================================
|
||||
:::set_path_recursive - Add a directory and subs to the path env variable if
|
||||
:::enhance_path_recursive - Add a directory and subs to the path env variable if
|
||||
::: required.
|
||||
:::.
|
||||
:::include:
|
||||
@@ -171,7 +167,7 @@ exit /b
|
||||
:::.
|
||||
:::usage:
|
||||
:::.
|
||||
::: call "%~DP0lib_path" set_path_recursive "[dir_path]" [max_depth] [append]
|
||||
::: call "%~DP0lib_path" enhance_path_recursive "[dir_path]" [max_depth] [append]
|
||||
:::.
|
||||
:::required:
|
||||
:::.
|
||||
@@ -194,13 +190,28 @@ exit /b
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
rem Parse arguments robustly:
|
||||
rem Accept either public form: "[dir_path]" [max_depth] [append]
|
||||
rem or internal recursive form: "[dir_path]" [depth] [max_depth] [append]
|
||||
set "depth=%~2"
|
||||
set "max_depth=%~3"
|
||||
set "position="
|
||||
|
||||
if "%~4" neq "" if /i "%~4" == "append" (
|
||||
set "position=%~4"
|
||||
) else (
|
||||
set "position="
|
||||
if /i "%~4" == "append" set "position=append"
|
||||
if /i "%~3" == "append" (
|
||||
set "position=append"
|
||||
set "max_depth="
|
||||
)
|
||||
|
||||
if not defined depth set "depth=0"
|
||||
if not defined max_depth (
|
||||
if defined depth (
|
||||
rem If only one numeric argument provided, treat it as max_depth
|
||||
set "max_depth=%depth%"
|
||||
set "depth=0"
|
||||
) else (
|
||||
set "max_depth=1"
|
||||
)
|
||||
)
|
||||
|
||||
dir "%add_path%" 2>NUL | findstr -i -e "%find_pathext%" >NUL
|
||||
@@ -213,11 +224,7 @@ exit /b
|
||||
|
||||
if "%fast_init%" == "1" (
|
||||
if "%add_to_path%" neq "" (
|
||||
if "%position%" == "append" (
|
||||
set "path=%path%;%add_to_path%"
|
||||
) else (
|
||||
set "path=%add_to_path%;%path%"
|
||||
)
|
||||
call :enhance_path "%add_to_path%" %position%
|
||||
)
|
||||
)
|
||||
|
||||
@@ -226,26 +233,20 @@ exit /b
|
||||
exit /b
|
||||
)
|
||||
|
||||
%print_debug% :set_path_recursive "Env Var - add_path=%add_to_path%"
|
||||
%print_debug% :set_path_recursive "Env Var - position=%position%"
|
||||
%print_debug% :set_path_recursive "Env Var - depth=%depth%"
|
||||
%print_debug% :set_path_recursive "Env Var - max_depth=%max_depth%"
|
||||
%print_debug% :enhance_path_recursive "Env Var - add_path=%add_to_path%"
|
||||
%print_debug% :enhance_path_recursive "Env Var - position=%position%"
|
||||
%print_debug% :enhance_path_recursive "Env Var - depth=%depth%"
|
||||
%print_debug% :enhance_path_recursive "Env Var - max_depth=%max_depth%"
|
||||
|
||||
if %max_depth% gtr %depth% (
|
||||
if "%add_to_path%" neq "" (
|
||||
%print_debug% :set_path_recursive "Adding parent directory - '%add_to_path%'"
|
||||
if "%position%" == "append" (
|
||||
set "path=%path%;%add_to_path%"
|
||||
) else (
|
||||
set "path=%add_to_path%;%path%"
|
||||
)
|
||||
%print_debug% :enhance_path_recursive "Adding parent directory - '%add_to_path%'"
|
||||
call :enhance_path "%add_to_path%" %position%
|
||||
)
|
||||
call :set_depth
|
||||
call :loop_depth
|
||||
)
|
||||
|
||||
set "PATH=%PATH%"
|
||||
|
||||
exit /b
|
||||
|
||||
:set_depth
|
||||
@@ -258,9 +259,9 @@ exit /b
|
||||
)
|
||||
|
||||
for /d %%i in ("%add_path%\*") do (
|
||||
%print_debug% :set_path_recursive "Env Var BEFORE - depth=%depth%"
|
||||
%print_debug% :set_path_recursive "Found Subdirectory - '%%~fi'"
|
||||
call :set_path_recursive "%%~fi" %depth% %max_depth% %position%
|
||||
%print_debug% :set_path_recursive "Env Var AFTER- depth=%depth%"
|
||||
%print_debug% :enhance_path_recursive "Env Var BEFORE - depth=%depth%"
|
||||
%print_debug% :enhance_path_recursive "Found Subdirectory - '%%~fi'"
|
||||
call :enhance_path_recursive "%%~fi" %depth% %max_depth% %position%
|
||||
%print_debug% :enhance_path_recursive "Env Var AFTER- depth=%depth%"
|
||||
)
|
||||
exit /b
|
||||
|
||||
66
vendor/profile.ps1
vendored
66
vendor/profile.ps1
vendored
@@ -28,31 +28,28 @@ if (!$ENV:CMDER_ROOT) {
|
||||
# Remove trailing '\'
|
||||
$ENV:CMDER_ROOT = ($ENV:CMDER_ROOT).TrimEnd("\")
|
||||
|
||||
# Recent PowerShell versions include PowerShellGet out of the box
|
||||
# -> recent PowerShell versions include PowerShellGet out of the box
|
||||
$moduleInstallerAvailable = [bool](Get-Command -Name 'Install-Module' -ErrorAction SilentlyContinue)
|
||||
|
||||
# Add Cmder modules directory to the autoload path.
|
||||
$CmderModulePath = Join-path $PSScriptRoot "psmodules/"
|
||||
|
||||
# Import Cmder functions
|
||||
$CmderFunctions = Join-Path $CmderModulePath "Cmder.ps1"
|
||||
. $CmderFunctions
|
||||
|
||||
# Configure PSModulePath to include Cmder modules if not already present
|
||||
if (-not $moduleInstallerAvailable -and -not $env:PSModulePath.Contains($CmderModulePath) ) {
|
||||
if(-not $moduleInstallerAvailable -and -not $env:PSModulePath.Contains($CmderModulePath) ) {
|
||||
$env:PSModulePath = $env:PSModulePath.Insert(0, "$CmderModulePath;")
|
||||
}
|
||||
|
||||
# Read vendored Git Version
|
||||
$gitVersionVendor = (readGitVersion -gitPath "$ENV:CMDER_ROOT\vendor\git-for-windows\cmd")
|
||||
$gitVersionVendor = (readVersion -gitPath "$ENV:CMDER_ROOT\vendor\git-for-windows\cmd")
|
||||
Write-Debug "GIT VENDOR: ${gitVersionVendor}"
|
||||
|
||||
# Get user installed Git version(s) if found, and compare them with vendored version.
|
||||
# Get user installed Git Version[s] and Compare with vendored if found.
|
||||
foreach ($git in (Get-Command -ErrorAction SilentlyContinue 'git')) {
|
||||
Write-Debug "GIT PATH: {$git.Path}"
|
||||
$gitDir = Split-Path -Path $git.Path
|
||||
$gitDir = isGitShim -gitPath $gitDir
|
||||
$gitVersionUser = (readGitVersion -gitPath $gitDir)
|
||||
$gitVersionUser = (readVersion -gitPath $gitDir)
|
||||
Write-Debug "GIT USER: ${gitVersionUser}"
|
||||
|
||||
$useGitVersion = compare_git_versions -userVersion $gitVersionUser -vendorVersion $gitVersionVendor
|
||||
@@ -75,7 +72,7 @@ foreach ($git in (Get-Command -ErrorAction SilentlyContinue 'git')) {
|
||||
}
|
||||
}
|
||||
|
||||
# Use vendored Git if no user Git found or user Git is older than vendored Git
|
||||
# User vendored Git.
|
||||
if ($null -eq $ENV:GIT_INSTALL_ROOT -and $null -ne $gitVersionVendor) {
|
||||
$ENV:GIT_INSTALL_ROOT = "$ENV:CMDER_ROOT\vendor\git-for-windows"
|
||||
$ENV:GIT_INSTALL_TYPE = 'VENDOR'
|
||||
@@ -88,41 +85,20 @@ if ($null -ne $ENV:GIT_INSTALL_ROOT) {
|
||||
$env:Path = Configure-Git -gitRoot "$ENV:GIT_INSTALL_ROOT" -gitType $ENV:GIT_INSTALL_TYPE -gitPathUser $gitPathUser
|
||||
}
|
||||
|
||||
# Create 'vi' alias for 'vim' if vim is available
|
||||
if (Get-Command -Name "vim" -ErrorAction SilentlyContinue) {
|
||||
New-Alias -name "vi" -value vim -errorAction SilentlyContinue
|
||||
New-Alias -name "vi" -value vim
|
||||
}
|
||||
|
||||
# PSReadline configuration
|
||||
if (Get-Module PSReadline -ErrorAction "SilentlyContinue") {
|
||||
# Display an extra prompt line between the prompt and the command input
|
||||
Set-PSReadlineOption -ExtraPromptLineCount 1
|
||||
|
||||
# Add OSC 133;C support for Windows Terminal shell integration
|
||||
# This marks the start of command output (emitted when Enter is pressed)
|
||||
if ($env:WT_SESSION) {
|
||||
Set-PSReadLineKeyHandler -Key Enter -ScriptBlock {
|
||||
# Get the current command line
|
||||
$line = $null
|
||||
$cursor = $null
|
||||
[Microsoft.PowerShell.PSConsoleReadLine]::GetBufferState([ref]$line, [ref]$cursor)
|
||||
|
||||
# Accept the line first
|
||||
[Microsoft.PowerShell.PSConsoleReadLine]::AcceptLine()
|
||||
|
||||
# Emit OSC 133;C sequence to mark start of command output
|
||||
# This is written directly to the console after the command is accepted
|
||||
[Console]::Write("$([char]0x1B)]133;C$([char]7)")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Pre-assign default prompt hooks so the first run of Cmder gets a working prompt
|
||||
# Pre-assign default prompt hooks so the first run of cmder gets a working prompt.
|
||||
$env:gitLoaded = $null
|
||||
[ScriptBlock]$PrePrompt = {}
|
||||
[ScriptBlock]$PostPrompt = {}
|
||||
[ScriptBlock]$CmderPrompt = {
|
||||
# Check if we're currently running under Admin privileges
|
||||
# Check if we're currently running under Admin privileges.
|
||||
$identity = [Security.Principal.WindowsIdentity]::GetCurrent()
|
||||
$principal = [Security.Principal.WindowsPrincipal] $identity
|
||||
$adminRole = [Security.Principal.WindowsBuiltInRole]::Administrator
|
||||
@@ -220,23 +196,6 @@ if ( $(Get-Command prompt).Definition -match 'PS \$\(\$executionContext.SessionS
|
||||
[ScriptBlock]$Prompt = {
|
||||
$lastSUCCESS = $?
|
||||
$realLastExitCode = $LastExitCode
|
||||
|
||||
# Emit OSC 9;9 sequence for Windows Terminal directory tracking
|
||||
# This enables "Duplicate Tab" and "Split Pane" to preserve the working directory
|
||||
# Only active in Windows Terminal ($env:WT_SESSION) or ConEmu ($env:ConEmuPID)
|
||||
$loc = $executionContext.SessionState.Path.CurrentLocation
|
||||
if (($env:WT_SESSION -or $env:ConEmuPID) -and $loc.Provider.Name -eq "FileSystem") {
|
||||
Microsoft.PowerShell.Utility\Write-Host -NoNewline "$([char]0x1B)]9;9;`"$($loc.ProviderPath)`"$([char]0x1B)\"
|
||||
}
|
||||
|
||||
# Emit OSC 133;A sequence for Windows Terminal shell integration
|
||||
# This marks the start of the prompt
|
||||
# Enables features like command navigation, selection, and visual separators
|
||||
# Only active in Windows Terminal ($env:WT_SESSION)
|
||||
if ($env:WT_SESSION) {
|
||||
Microsoft.PowerShell.Utility\Write-Host -NoNewline "$([char]0x1B)]133;A$([char]7)"
|
||||
}
|
||||
|
||||
$host.UI.RawUI.WindowTitle = Microsoft.PowerShell.Management\Split-Path $pwd.ProviderPath -Leaf
|
||||
Microsoft.PowerShell.Utility\Write-Host -NoNewline "$([char]0x200B)`r$([char]0x1B)[K"
|
||||
if ($lastSUCCESS -or ($LastExitCode -ne 0)) {
|
||||
@@ -245,13 +204,6 @@ if ( $(Get-Command prompt).Definition -match 'PS \$\(\$executionContext.SessionS
|
||||
PrePrompt | Microsoft.PowerShell.Utility\Write-Host -NoNewline
|
||||
CmderPrompt
|
||||
PostPrompt | Microsoft.PowerShell.Utility\Write-Host -NoNewline
|
||||
|
||||
# Emit OSC 133;B sequence for Windows Terminal shell integration
|
||||
# This marks the start of command input (after prompt, before user types)
|
||||
if ($env:WT_SESSION) {
|
||||
Microsoft.PowerShell.Utility\Write-Host -NoNewline "$([char]0x1B)]133;B$([char]7)"
|
||||
}
|
||||
|
||||
$global:LastExitCode = $realLastExitCode
|
||||
return " "
|
||||
}
|
||||
|
||||
30
vendor/psmodules/Cmder.ps1
vendored
30
vendor/psmodules/Cmder.ps1
vendored
@@ -1,4 +1,4 @@
|
||||
function readGitVersion($gitPath) {
|
||||
function readVersion($gitPath) {
|
||||
$gitExecutable = "${gitPath}\git.exe"
|
||||
|
||||
if (-not (Test-Path "$gitExecutable")) {
|
||||
@@ -18,7 +18,7 @@ function readGitVersion($gitPath) {
|
||||
}
|
||||
|
||||
function isGitShim($gitPath) {
|
||||
# Check if there is a shim file - if yes, read the actual executable path
|
||||
# check if there is a shim file - if yes, read the actual executable path
|
||||
# See: github.com/ScoopInstaller/Shim
|
||||
|
||||
if (Test-Path "${gitPath}\git.shim") {
|
||||
@@ -177,29 +177,3 @@ function getGitStatusSetting() {
|
||||
|
||||
return $true
|
||||
}
|
||||
|
||||
function yOrn( $question ) {
|
||||
Do {
|
||||
$Answer = Read-Host -Prompt "`n${question}? (y/n) "
|
||||
}
|
||||
Until ($Answer -eq 'y' -or $Answer -eq 'n' -or $Answer -eq 'yes' -or $Answer -eq 'no')
|
||||
|
||||
return $Answer
|
||||
}
|
||||
|
||||
function templateExpand($template_filename, $outfile) {
|
||||
$template = Get-Content "$template_filename" -Raw
|
||||
|
||||
$expanded = Invoke-Expression "@`"`r`n$template`r`n`"@"
|
||||
|
||||
$overwrite = 'y'
|
||||
if ((test-path "$outfile")) {
|
||||
$overwrite = yOrn "'$outfile' already exists do you want to overwrite it"
|
||||
}
|
||||
|
||||
if ($overwrite -match 'y') {
|
||||
$expanded | out-file -ErrorAction silentlycontinue -encoding ascii "$outfile"
|
||||
} else {
|
||||
write-host "Skipping Cmder '$shell' config generation at user request!"
|
||||
}
|
||||
}
|
||||
|
||||
19
vendor/sources.json
vendored
19
vendor/sources.json
vendored
@@ -1,27 +1,22 @@
|
||||
[
|
||||
{
|
||||
"name": "git-for-windows",
|
||||
"version": "2.51.2.windows.1",
|
||||
"url": "https://github.com/git-for-windows/git/releases/download/v2.51.2.windows.1/PortableGit-2.51.2-64-bit.7z.exe"
|
||||
"version": "2.49.0.windows.1",
|
||||
"url": "https://github.com/git-for-windows/git/releases/download/v2.49.0.windows.1/PortableGit-2.49.0-64-bit.7z.exe"
|
||||
},
|
||||
{
|
||||
"name": "clink",
|
||||
"version": "1.8.8",
|
||||
"url": "https://github.com/chrisant996/clink/releases/download/v1.8.8/clink.1.8.8.a63364.zip"
|
||||
"version": "1.7.14",
|
||||
"url": "https://github.com/chrisant996/clink/releases/download/v1.7.14/clink.1.7.14.843933.zip"
|
||||
},
|
||||
{
|
||||
"name": "conemu-maximus5",
|
||||
"version": "23.07.24",
|
||||
"url": "https://github.com/ConEmu/ConEmu/releases/download/v23.07.24/ConEmuPack.230724.7z"
|
||||
},
|
||||
{
|
||||
"name": "windows-terminal",
|
||||
"version": "1.23.12811.0",
|
||||
"url": "https://github.com/microsoft/terminal/releases/download/v1.23.12811.0/Microsoft.WindowsTerminal_1.23.12811.0_x64.zip"
|
||||
"url": "https://github.com/Maximus5/ConEmu/releases/download/v23.07.24/ConEmuPack.230724.7z"
|
||||
},
|
||||
{
|
||||
"name": "clink-completions",
|
||||
"version": "0.6.6",
|
||||
"url": "https://github.com/vladimir-kotikov/clink-completions/archive/v0.6.6.zip"
|
||||
"version": "0.6.2",
|
||||
"url": "https://github.com/vladimir-kotikov/clink-completions/archive/v0.6.2.zip"
|
||||
}
|
||||
]
|
||||
|
||||
51
vendor/start_git_bash.cmd
vendored
51
vendor/start_git_bash.cmd
vendored
@@ -1,51 +0,0 @@
|
||||
@echo off
|
||||
|
||||
if not defined CMDER_ROOT (
|
||||
if defined ConEmuDir (
|
||||
for /f "delims=" %%i in ("%ConEmuDir%\..\..") do (
|
||||
set "CMDER_ROOT=%%~fi"
|
||||
)
|
||||
) else (
|
||||
for /f "delims=" %%i in ("%~dp0\..") do (
|
||||
set "CMDER_ROOT=%%~fi"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
if defined ConEmuDir (
|
||||
set "gitCommand=--command=%ConEmuBaseDirShort%\conemu-msys2-64.exe"
|
||||
)
|
||||
|
||||
if exist "%CMDER_ROOT%\vendor\git-for-windows" (
|
||||
set "PATH=%CMDER_ROOT%\vendor\git-for-windows\usr\bin;%PATH%"
|
||||
set "gitCmd=%CMDER_ROOT%\vendor\git-for-windows\git-cmd.exe"
|
||||
set "bashCmd=%CMDER_ROOT%\vendor\git-for-windows\usr\bin\bash.exe"
|
||||
) else if exist "%ProgramFiles%\git" (
|
||||
set "PATH=%ProgramFiles%\git\usr\bin;%PATH%"
|
||||
set "gitCmd=%ProgramFiles%\git\git-cmd.exe"
|
||||
set "bashCmd=%ProgramFiles%\git\usr\bin\bash.exe"
|
||||
if not exist "%ProgramFiles%\git\etc\profile.d\cmder_exinit.sh" (
|
||||
echo Run 'mklink "%ProgramFiles%\git\etc\profile.d\cmder_exinit.sh" "%CMDER_ROOT%\vendor\cmder_exinit"' in 'cmd::Cmder as Admin' to use Cmder with external Git Bash
|
||||
echo.
|
||||
echo or
|
||||
echo.
|
||||
echo Run 'echo "" ^> "%ProgramFiles%\git\etc\profile.d\cmder_exinit.sh"' in 'cmd::Cmder as Admin' to disable this message.
|
||||
)
|
||||
) else if exist "%ProgramFiles(x86)%\git" (
|
||||
set "PATH=%ProgramFiles(x86)%\git\usr\bin;%PATH%"
|
||||
set "gitCmd=%ProgramFiles(x86)%\git\git-cmd.exe"
|
||||
set "bashCmd=%ProgramFiles(x86)%\git\usr\bin\bash.exe"
|
||||
if not exist "%ProgramFiles(x86)%\git\etc\profile.d\cmder_exinit.sh" (
|
||||
echo Run 'mklink "%ProgramFiles^(x86^)%\git\etc\profile.d\cmder_exinit.sh" "%CMDER_ROOT%\vendor\cmder_exinit"' in 'cmd::Cmder as Admin' to use Cmder with external Git Bash
|
||||
echo.
|
||||
echo or
|
||||
echo.
|
||||
echo Run 'echo "" ^> "%ProgramFiles^(x86^)%\git\etc\profile.d\cmder_exinit.sh"' in 'cmd::Cmder as Admin' to disable this message.
|
||||
)
|
||||
)
|
||||
|
||||
if defined ConEmuDir (
|
||||
"%gitCmd%" --no-cd %gitCommand% "%bashCmd%" --login -i
|
||||
) else (
|
||||
"%bashCmd%" --login -i
|
||||
)
|
||||
40
vendor/start_git_mintty.cmd
vendored
40
vendor/start_git_mintty.cmd
vendored
@@ -1,40 +0,0 @@
|
||||
@echo off
|
||||
|
||||
if not defined CMDER_ROOT (
|
||||
if defined ConEmuDir (
|
||||
for /f "delims=" %%i in ("%ConEmuDir%\..\..") do (
|
||||
set "CMDER_ROOT=%%~fi"
|
||||
)
|
||||
) else (
|
||||
for /f "delims=" %%i in ("%~dp0\..") do (
|
||||
set "CMDER_ROOT=%%~fi"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
if exist "%CMDER_ROOT%\vendor\git-for-windows" (
|
||||
set "PATH=%CMDER_ROOT%\vendor\git-for-windows\usr\bin;%PATH%"
|
||||
set "gitCmd=%CMDER_ROOT%\vendor\git-for-windows\usr\bin\mintty.exe"
|
||||
) else if exist "%ProgramFiles%\git" (
|
||||
set "PATH=%ProgramFiles%\git\usr\bin;%PATH%"
|
||||
set "gitCmd=%ProgramFiles%\git\usr\bin\mintty.exe"
|
||||
if not exist "%ProgramFiles%\git\etc\profile.d\cmder_exinit.sh" (
|
||||
echo Run 'mklink "%ProgramFiles%\git\etc\profile.d\cmder_exinit.sh" "%CMDER_ROOT%\vendor\cmder_exinit"' in 'cmd::Cmder as Admin' to use Cmder with external Git Bash
|
||||
echo.
|
||||
echo or
|
||||
echo.
|
||||
echo Run 'echo "" ^> "%ProgramFiles%\git\etc\profile.d\cmder_exinit.sh"' in 'cmd::Cmder as Admin' to disable this message.
|
||||
)
|
||||
) else if exist "%ProgramFiles(x86)%\git" (
|
||||
set "PATH=%ProgramFiles(x86)%\git\usr\bin;%PATH%"
|
||||
set "gitCmd=%ProgramFiles(x86)%\git\usr\bin\mintty.exe"
|
||||
if not exist "%ProgramFiles(x86)%\git\etc\profile.d\cmder_exinit.sh" (
|
||||
echo Run 'mklink "%ProgramFiles^(x86^)%\git\etc\profile.d\cmder_exinit.sh" "%CMDER_ROOT%\vendor\cmder_exinit"' in 'cmd::Cmder as Admin' to use Cmder with external Git Bash
|
||||
echo.
|
||||
echo or
|
||||
echo.
|
||||
echo Run 'echo "" ^> "%ProgramFiles^(x86^)%\git\etc\profile.d\cmder_exinit.sh"' in 'cmd::Cmder as Admin' to disable this message.
|
||||
)
|
||||
)
|
||||
|
||||
"%gitCmd%" /bin/bash -l
|
||||
174
vendor/user_init.cmd.template
vendored
174
vendor/user_init.cmd.template
vendored
@@ -1,174 +0,0 @@
|
||||
@echo off
|
||||
|
||||
:: This file was autogenerated by Cmder init.bat
|
||||
::
|
||||
:: It is yours to edit and will not be touched again by Cmder.
|
||||
::
|
||||
:: If you wish to recreate this file simply rename it and Cmder will re-create it the next time it is run
|
||||
:: or run the followin command from a Cmder shell:
|
||||
::
|
||||
:: powershell -f %cmder_root%\vendor\bin\create-cmdercfg.ps1 -shell cmd [-outfile "[filename]"]
|
||||
::
|
||||
|
||||
if "%CMDER_CLINK%" == "1" (
|
||||
goto :INJECT_CLINK
|
||||
) else if "%CMDER_CLINK%" == "2" if defined WT_PROFILE_ID (
|
||||
goto :INJECT_CLINK
|
||||
) else if "%CMDER_CLINK%" == "2" (
|
||||
goto :CLINK_FINISH
|
||||
)
|
||||
|
||||
goto :SKIP_CLINK
|
||||
|
||||
:INJECT_CLINK
|
||||
%print_verbose% "Injecting Clink!"
|
||||
|
||||
:: Check if Clink is not present
|
||||
if not exist "%CMDER_ROOT%\vendor\clink\clink_%clink_architecture%.exe" (
|
||||
goto :SKIP_CLINK
|
||||
)
|
||||
|
||||
:: Run Clink
|
||||
if not exist "%CMDER_CONFIG_DIR%\settings" if not exist "%CMDER_CONFIG_DIR%\clink_settings" (
|
||||
echo Generating Clink initial settings in "%CMDER_CONFIG_DIR%\clink_settings"
|
||||
copy "%CMDER_ROOT%\vendor\clink_settings.default" "%CMDER_CONFIG_DIR%\clink_settings"
|
||||
echo Additional *.lua files in "%CMDER_CONFIG_DIR%" are loaded on startup.
|
||||
)
|
||||
|
||||
if not exist "%CMDER_CONFIG_DIR%\cmder_prompt_config.lua" (
|
||||
echo Creating Cmder prompt config file: "%CMDER_CONFIG_DIR%\cmder_prompt_config.lua"
|
||||
copy "%CMDER_ROOT%\vendor\cmder_prompt_config.lua.default" "%CMDER_CONFIG_DIR%\cmder_prompt_config.lua"
|
||||
)
|
||||
|
||||
"%CMDER_ROOT%\vendor\clink\clink_%clink_architecture%.exe" inject --quiet --profile "%CMDER_CONFIG_DIR%" --scripts "%CMDER_ROOT%\vendor"
|
||||
|
||||
if errorlevel 1 (
|
||||
%print_error% "Clink initialization has failed with error code: %errorlevel%"
|
||||
goto :CLINK_FINISH
|
||||
)
|
||||
|
||||
set CMDER_CLINK=2
|
||||
goto :CLINK_FINISH
|
||||
|
||||
:SKIP_CLINK
|
||||
%print_warning% "Skipping Clink Injection!"
|
||||
|
||||
for /f "tokens=2 delims=:." %%x in ('chcp') do set cp=%%x
|
||||
chcp 65001>nul
|
||||
|
||||
:: Revert back to plain cmd.exe prompt without clink
|
||||
prompt `$E[1;32;49m`$P`$S`$_`$E[1;30;49mλ`$S`$E[0m
|
||||
|
||||
chcp %cp%>nul
|
||||
|
||||
:CLINK_FINISH
|
||||
if not defined GIT_INSTALL_ROOT set "GIT_INSTALL_ROOT=$env:GIT_INSTALL_ROOT"
|
||||
if not defined SVN_SSH set "SVN_SSH=$env:SVN_SSH"
|
||||
if not defined git_locale set git_locale=$env:git_locale
|
||||
if not defined LANG set LANG=$env:lang
|
||||
if not defined user_aliases set "user_aliases=$env:user_aliases"
|
||||
if not defined aliases set "aliases=%user_aliases%"
|
||||
if not defined HOME set "HOME=%USERPROFILE%"
|
||||
|
||||
set PLINK_PROTOCOL=$env:PLINK_PROTOCOL
|
||||
|
||||
set "path=%GIT_INSTALL_ROOT%\cmd;%path%"
|
||||
|
||||
set path_position=append
|
||||
if %nix_tools% equ 1 (
|
||||
set "path_position=append"
|
||||
) else (
|
||||
set "path_position="
|
||||
)
|
||||
|
||||
if %nix_tools% geq 1 (
|
||||
if exist "%GIT_INSTALL_ROOT%\mingw32" (
|
||||
if "%path_position%" == "append" (
|
||||
set "path=%path%;%GIT_INSTALL_ROOT%\mingw32\bin"
|
||||
) else (
|
||||
set "path=%GIT_INSTALL_ROOT%\mingw32\bin;%path%"
|
||||
)
|
||||
) else if exist "%GIT_INSTALL_ROOT%\mingw64" (
|
||||
if "%path_position%" == "append" (
|
||||
set "path=%path%;%GIT_INSTALL_ROOT%\mingw64\bin"
|
||||
) else (
|
||||
set "path=%GIT_INSTALL_ROOT%\mingw64\bin;%path%"
|
||||
)
|
||||
)
|
||||
if exist "%GIT_INSTALL_ROOT%\usr\bin" (
|
||||
if "%path_position%" == "append" (
|
||||
set "path=%path%;%GIT_INSTALL_ROOT%\usr\bin"
|
||||
) else (
|
||||
set "path=%GIT_INSTALL_ROOT%\usr\bin;%path%"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
set "path=%CMDER_ROOT%\vendor\bin;%path%"
|
||||
|
||||
:USER_CONFIG_START
|
||||
if %max_depth% gtr 1 (
|
||||
%lib_path% enhance_path_recursive "%CMDER_ROOT%\bin" 0 %max_depth%
|
||||
) else (
|
||||
set "path=%CMDER_ROOT%\bin;%path%"
|
||||
)
|
||||
|
||||
setlocal enabledelayedexpansion
|
||||
if defined CMDER_USER_BIN (
|
||||
if %max_depth% gtr 1 (
|
||||
%lib_path% enhance_path_recursive "%CMDER_USER_BIN%" 0 %max_depth%
|
||||
) else (
|
||||
set "path=%CMDER_USER_ROOT%\bin;%path%"
|
||||
)
|
||||
)
|
||||
endlocal && set "path=%path%"
|
||||
|
||||
set "path=%path%;%CMDER_ROOT%"
|
||||
|
||||
call "%user_aliases%"
|
||||
|
||||
%lib_profile% run_profile_d "%CMDER_ROOT%\config\profile.d"
|
||||
if defined CMDER_USER_CONFIG (
|
||||
%lib_profile% run_profile_d "%CMDER_USER_CONFIG%\profile.d"
|
||||
)
|
||||
|
||||
call "%CMDER_ROOT%\config\user_profile.cmd"
|
||||
if defined CMDER_USER_CONFIG (
|
||||
if exist "%CMDER_USER_CONFIG%\user_profile.cmd" (
|
||||
call "%CMDER_USER_CONFIG%\user_profile.cmd"
|
||||
)
|
||||
)
|
||||
|
||||
set "path=%path:;;=;%
|
||||
|
||||
:CMDER_CONFIGURED
|
||||
if not defined CMDER_CONFIGURED set CMDER_CONFIGURED=1
|
||||
|
||||
set CMDER_INIT_END=%time%
|
||||
|
||||
if "%time_init%" == "1" if "%CMDER_INIT_END%" neq "" if "%CMDER_INIT_START%" neq "" (
|
||||
call "%cmder_root%\vendor\bin\timer.cmd" "%CMDER_INIT_START%" "%CMDER_INIT_END%"
|
||||
)
|
||||
|
||||
:CLEANUP
|
||||
set architecture_bits=
|
||||
set CMDER_ALIASES=
|
||||
set CMDER_INIT_END=
|
||||
set CMDER_INIT_START=
|
||||
set CMDER_USER_FLAGS=
|
||||
set debug_output=
|
||||
set fast_init=
|
||||
set max_depth=
|
||||
set nix_tools=
|
||||
set path_position=
|
||||
set print_debug=
|
||||
set print_error=
|
||||
set print_verbose=
|
||||
set print_warning=
|
||||
set time_init=
|
||||
set verbose_output=
|
||||
set user_aliases=
|
||||
|
||||
exit /b
|
||||
|
||||
|
||||
390
vendor/windows_terminal_default_settings.json
vendored
390
vendor/windows_terminal_default_settings.json
vendored
@@ -1,390 +0,0 @@
|
||||
{
|
||||
"$help": "https://aka.ms/terminal-documentation",
|
||||
"$schema": "https://aka.ms/terminal-profiles-schema",
|
||||
"actions": [
|
||||
{
|
||||
"command": {
|
||||
"action": "copy",
|
||||
"singleLine": false
|
||||
},
|
||||
"keys": "ctrl+shift+c"
|
||||
},
|
||||
{
|
||||
"command": "unbound",
|
||||
"keys": "ctrl+v"
|
||||
},
|
||||
{
|
||||
"command": "unbound",
|
||||
"keys": "ctrl+c"
|
||||
},
|
||||
{
|
||||
"command": "paste"
|
||||
},
|
||||
{
|
||||
"command": "find",
|
||||
"keys": "ctrl+shift+f"
|
||||
},
|
||||
{
|
||||
"command": {
|
||||
"action": "splitPane",
|
||||
"split": "auto",
|
||||
"splitMode": "duplicate"
|
||||
},
|
||||
"keys": "alt+shift+d"
|
||||
}
|
||||
],
|
||||
"copyFormatting": "none",
|
||||
"copyOnSelect": true,
|
||||
"defaultProfile": "{48946353-ebe8-4571-a591-7d609f31327a}",
|
||||
"newTabMenu": [
|
||||
{
|
||||
"type": "remainingProfiles"
|
||||
}
|
||||
],
|
||||
"profiles": {
|
||||
"defaults": {
|
||||
"colorScheme": "One Half Dark",
|
||||
"font": {
|
||||
"face": "Cascadia Code"
|
||||
}
|
||||
},
|
||||
"list": [
|
||||
{
|
||||
"colorScheme": "One Half Dark",
|
||||
"commandline": "cmd /k \"%WT_SETTINGS_DIR%\\..\\..\\init.bat\"",
|
||||
"guid": "{48946353-ebe8-4571-a591-7d609f31327a}",
|
||||
"hidden": false,
|
||||
"icon": "%WT_SETTINGS_DIR%\\..\\..\\..\\icons\\cmder.ico",
|
||||
"name": "Cmder",
|
||||
"startingDirectory": null,
|
||||
"tabTitle": "Cmder",
|
||||
"useAtlasEngine": false
|
||||
},
|
||||
{
|
||||
"colorScheme": "One Half Dark",
|
||||
"commandline": "%SystemRoot%\\System32\\cmd.exe /k \"%WT_SETTINGS_DIR%\\..\\..\\init.bat\"",
|
||||
"elevate": true,
|
||||
"guid": "{bdd957d0-c15a-49e6-9816-14b02351a071}",
|
||||
"hidden": false,
|
||||
"icon": "%WT_SETTINGS_DIR%\\..\\..\\..\\icons\\cmder_red.ico",
|
||||
"name": "Cmder as Admin",
|
||||
"startingDirectory": null,
|
||||
"tabTitle": "Cmder as Admin"
|
||||
},
|
||||
{
|
||||
"colorScheme": "One Half Dark",
|
||||
"commandline": "PowerShell -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command \"Invoke-Expression 'Import-Module ''%WT_SETTINGS_DIR%\\..\\..\\profile.ps1'''\"",
|
||||
"guid": "{eb1f6578-ce9d-47a9-a8c7-9b3fdd22302d}",
|
||||
"hidden": false,
|
||||
"icon": "%WT_SETTINGS_DIR%\\..\\..\\..\\icons\\cmder_orange.ico",
|
||||
"name": "Cmder - PowerShell",
|
||||
"startingDirectory": null,
|
||||
"tabTitle": "Cmder",
|
||||
"useAtlasEngine": false
|
||||
},
|
||||
{
|
||||
"colorScheme": "One Half Dark",
|
||||
"commandline": "PowerShell -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command \"Invoke-Expression 'Import-Module ''%WT_SETTINGS_DIR%\\..\\..\\profile.ps1'''\"",
|
||||
"elevate": true,
|
||||
"guid": "{c5225c3e-8619-4145-8182-2800814eeb17}",
|
||||
"hidden": false,
|
||||
"icon": "%WT_SETTINGS_DIR%\\..\\..\\..\\icons\\cmder_purple.ico",
|
||||
"name": "Cmder - PowerShell as Admin",
|
||||
"startingDirectory": null,
|
||||
"tabTitle": "Cmder - PowerShell as Admin",
|
||||
"useAtlasEngine": false
|
||||
},
|
||||
{
|
||||
"colorScheme": "One Half Dark",
|
||||
"commandline": "%WT_SETTINGS_DIR%\\..\\..\\start_git_bash.cmd",
|
||||
"guid": "{c5c298e9-010e-4b8c-bc55-e3df81846b4c}",
|
||||
"hidden": false,
|
||||
"icon": "%WT_SETTINGS_DIR%\\..\\..\\..\\icons\\cmder_blue.ico",
|
||||
"name": "Cmder - Bash",
|
||||
"startingDirectory": null,
|
||||
"tabTitle": "Cmder - Bash"
|
||||
},
|
||||
{
|
||||
"colorScheme": "One Half Dark",
|
||||
"commandline": "%WT_SETTINGS_DIR%\\..\\..\\start_git_bash.cmd",
|
||||
"elevate": true,
|
||||
"guid": "{545eb9ed-4c1c-49b3-8cc6-7eb41bd280ff}",
|
||||
"hidden": false,
|
||||
"icon": "%WT_SETTINGS_DIR%\\..\\..\\..\\icons\\cmder_yellow.ico",
|
||||
"name": "Cmder - Bash as Admin",
|
||||
"startingDirectory": null,
|
||||
"tabTitle": "Cmder - Bash as Admin"
|
||||
},
|
||||
{
|
||||
"commandline": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
|
||||
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
|
||||
"hidden": false,
|
||||
"name": "Windows PowerShell"
|
||||
},
|
||||
{
|
||||
"commandline": "%SystemRoot%\\System32\\cmd.exe",
|
||||
"guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
|
||||
"hidden": false,
|
||||
"name": "Command Prompt"
|
||||
}
|
||||
]
|
||||
},
|
||||
"schemes": [
|
||||
{
|
||||
"background": "#0C0C0C",
|
||||
"black": "#0C0C0C",
|
||||
"blue": "#0037DA",
|
||||
"brightBlack": "#767676",
|
||||
"brightBlue": "#3B78FF",
|
||||
"brightCyan": "#61D6D6",
|
||||
"brightGreen": "#16C60C",
|
||||
"brightPurple": "#B4009E",
|
||||
"brightRed": "#E74856",
|
||||
"brightWhite": "#F2F2F2",
|
||||
"brightYellow": "#F9F1A5",
|
||||
"cursorColor": "#FFFFFF",
|
||||
"cyan": "#3A96DD",
|
||||
"foreground": "#CCCCCC",
|
||||
"green": "#13A10E",
|
||||
"name": "Campbell",
|
||||
"purple": "#881798",
|
||||
"red": "#C50F1F",
|
||||
"selectionBackground": "#FFFFFF",
|
||||
"white": "#CCCCCC",
|
||||
"yellow": "#C19C00"
|
||||
},
|
||||
{
|
||||
"background": "#012456",
|
||||
"black": "#0C0C0C",
|
||||
"blue": "#0037DA",
|
||||
"brightBlack": "#767676",
|
||||
"brightBlue": "#3B78FF",
|
||||
"brightCyan": "#61D6D6",
|
||||
"brightGreen": "#16C60C",
|
||||
"brightPurple": "#B4009E",
|
||||
"brightRed": "#E74856",
|
||||
"brightWhite": "#F2F2F2",
|
||||
"brightYellow": "#F9F1A5",
|
||||
"cursorColor": "#FFFFFF",
|
||||
"cyan": "#3A96DD",
|
||||
"foreground": "#CCCCCC",
|
||||
"green": "#13A10E",
|
||||
"name": "Campbell Powershell",
|
||||
"purple": "#881798",
|
||||
"red": "#C50F1F",
|
||||
"selectionBackground": "#FFFFFF",
|
||||
"white": "#CCCCCC",
|
||||
"yellow": "#C19C00"
|
||||
},
|
||||
{
|
||||
"background": "#282828",
|
||||
"black": "#282828",
|
||||
"blue": "#458588",
|
||||
"brightBlack": "#928374",
|
||||
"brightBlue": "#83A598",
|
||||
"brightCyan": "#8EC07C",
|
||||
"brightGreen": "#B8BB26",
|
||||
"brightPurple": "#D3869B",
|
||||
"brightRed": "#FB4934",
|
||||
"brightWhite": "#EBDBB2",
|
||||
"brightYellow": "#FABD2F",
|
||||
"cursorColor": "#FFFFFF",
|
||||
"cyan": "#689D6A",
|
||||
"foreground": "#EBDBB2",
|
||||
"green": "#98971A",
|
||||
"name": "Gruvbox Dark",
|
||||
"purple": "#B16286",
|
||||
"red": "#CC241D",
|
||||
"selectionBackground": "#FFFFFF",
|
||||
"white": "#A89984",
|
||||
"yellow": "#D79921"
|
||||
},
|
||||
{
|
||||
"background": "#272822",
|
||||
"black": "#3E3D32",
|
||||
"blue": "#03395C",
|
||||
"brightBlack": "#272822",
|
||||
"brightBlue": "#66D9EF",
|
||||
"brightCyan": "#66D9EF",
|
||||
"brightGreen": "#A6E22E",
|
||||
"brightPurple": "#AE81FF",
|
||||
"brightRed": "#F92672",
|
||||
"brightWhite": "#F8F8F2",
|
||||
"brightYellow": "#FD971F",
|
||||
"cursorColor": "#FFFFFF",
|
||||
"cyan": "#66D9EF",
|
||||
"foreground": "#F8F8F2",
|
||||
"green": "#A6E22E",
|
||||
"name": "Monokai",
|
||||
"purple": "#AE81FF",
|
||||
"red": "#F92672",
|
||||
"selectionBackground": "#FFFFFF",
|
||||
"white": "#F8F8F2",
|
||||
"yellow": "#FFE792"
|
||||
},
|
||||
{
|
||||
"background": "#282C34",
|
||||
"black": "#282C34",
|
||||
"blue": "#61AFEF",
|
||||
"brightBlack": "#5A6374",
|
||||
"brightBlue": "#61AFEF",
|
||||
"brightCyan": "#56B6C2",
|
||||
"brightGreen": "#98C379",
|
||||
"brightPurple": "#C678DD",
|
||||
"brightRed": "#E06C75",
|
||||
"brightWhite": "#DCDFE4",
|
||||
"brightYellow": "#E5C07B",
|
||||
"cursorColor": "#FFFFFF",
|
||||
"cyan": "#56B6C2",
|
||||
"foreground": "#DCDFE4",
|
||||
"green": "#98C379",
|
||||
"name": "One Half Dark",
|
||||
"purple": "#C678DD",
|
||||
"red": "#E06C75",
|
||||
"selectionBackground": "#FFFFFF",
|
||||
"white": "#DCDFE4",
|
||||
"yellow": "#E5C07B"
|
||||
},
|
||||
{
|
||||
"background": "#FAFAFA",
|
||||
"black": "#383A42",
|
||||
"blue": "#0184BC",
|
||||
"brightBlack": "#4F525D",
|
||||
"brightBlue": "#61AFEF",
|
||||
"brightCyan": "#56B5C1",
|
||||
"brightGreen": "#98C379",
|
||||
"brightPurple": "#C577DD",
|
||||
"brightRed": "#DF6C75",
|
||||
"brightWhite": "#FFFFFF",
|
||||
"brightYellow": "#E4C07A",
|
||||
"cursorColor": "#4F525D",
|
||||
"cyan": "#0997B3",
|
||||
"foreground": "#383A42",
|
||||
"green": "#50A14F",
|
||||
"name": "One Half Light",
|
||||
"purple": "#A626A4",
|
||||
"red": "#E45649",
|
||||
"selectionBackground": "#FFFFFF",
|
||||
"white": "#FAFAFA",
|
||||
"yellow": "#C18301"
|
||||
},
|
||||
{
|
||||
"background": "#002B36",
|
||||
"black": "#002B36",
|
||||
"blue": "#268BD2",
|
||||
"brightBlack": "#073642",
|
||||
"brightBlue": "#839496",
|
||||
"brightCyan": "#93A1A1",
|
||||
"brightGreen": "#586E75",
|
||||
"brightPurple": "#6C71C4",
|
||||
"brightRed": "#CB4B16",
|
||||
"brightWhite": "#FDF6E3",
|
||||
"brightYellow": "#657B83",
|
||||
"cursorColor": "#FFFFFF",
|
||||
"cyan": "#2AA198",
|
||||
"foreground": "#839496",
|
||||
"green": "#859900",
|
||||
"name": "Solarized Dark",
|
||||
"purple": "#D33682",
|
||||
"red": "#DC322F",
|
||||
"selectionBackground": "#FFFFFF",
|
||||
"white": "#EEE8D5",
|
||||
"yellow": "#B58900"
|
||||
},
|
||||
{
|
||||
"background": "#FDF6E3",
|
||||
"black": "#002B36",
|
||||
"blue": "#268BD2",
|
||||
"brightBlack": "#073642",
|
||||
"brightBlue": "#839496",
|
||||
"brightCyan": "#93A1A1",
|
||||
"brightGreen": "#586E75",
|
||||
"brightPurple": "#6C71C4",
|
||||
"brightRed": "#CB4B16",
|
||||
"brightWhite": "#FDF6E3",
|
||||
"brightYellow": "#657B83",
|
||||
"cursorColor": "#002B36",
|
||||
"cyan": "#2AA198",
|
||||
"foreground": "#657B83",
|
||||
"green": "#859900",
|
||||
"name": "Solarized Light",
|
||||
"purple": "#D33682",
|
||||
"red": "#DC322F",
|
||||
"selectionBackground": "#FFFFFF",
|
||||
"white": "#EEE8D5",
|
||||
"yellow": "#B58900"
|
||||
},
|
||||
{
|
||||
"background": "#000000",
|
||||
"black": "#000000",
|
||||
"blue": "#3465A4",
|
||||
"brightBlack": "#555753",
|
||||
"brightBlue": "#729FCF",
|
||||
"brightCyan": "#34E2E2",
|
||||
"brightGreen": "#8AE234",
|
||||
"brightPurple": "#AD7FA8",
|
||||
"brightRed": "#EF2929",
|
||||
"brightWhite": "#EEEEEC",
|
||||
"brightYellow": "#FCE94F",
|
||||
"cursorColor": "#FFFFFF",
|
||||
"cyan": "#06989A",
|
||||
"foreground": "#D3D7CF",
|
||||
"green": "#4E9A06",
|
||||
"name": "Tango Dark",
|
||||
"purple": "#75507B",
|
||||
"red": "#CC0000",
|
||||
"selectionBackground": "#FFFFFF",
|
||||
"white": "#D3D7CF",
|
||||
"yellow": "#C4A000"
|
||||
},
|
||||
{
|
||||
"background": "#FFFFFF",
|
||||
"black": "#000000",
|
||||
"blue": "#3465A4",
|
||||
"brightBlack": "#555753",
|
||||
"brightBlue": "#729FCF",
|
||||
"brightCyan": "#34E2E2",
|
||||
"brightGreen": "#8AE234",
|
||||
"brightPurple": "#AD7FA8",
|
||||
"brightRed": "#EF2929",
|
||||
"brightWhite": "#EEEEEC",
|
||||
"brightYellow": "#FCE94F",
|
||||
"cursorColor": "#000000",
|
||||
"cyan": "#06989A",
|
||||
"foreground": "#555753",
|
||||
"green": "#4E9A06",
|
||||
"name": "Tango Light",
|
||||
"purple": "#75507B",
|
||||
"red": "#CC0000",
|
||||
"selectionBackground": "#FFFFFF",
|
||||
"white": "#D3D7CF",
|
||||
"yellow": "#C4A000"
|
||||
},
|
||||
{
|
||||
"background": "#000000",
|
||||
"black": "#000000",
|
||||
"blue": "#000080",
|
||||
"brightBlack": "#808080",
|
||||
"brightBlue": "#0000FF",
|
||||
"brightCyan": "#00FFFF",
|
||||
"brightGreen": "#00FF00",
|
||||
"brightPurple": "#FF00FF",
|
||||
"brightRed": "#FF0000",
|
||||
"brightWhite": "#FFFFFF",
|
||||
"brightYellow": "#FFFF00",
|
||||
"cursorColor": "#FFFFFF",
|
||||
"cyan": "#008080",
|
||||
"foreground": "#C0C0C0",
|
||||
"green": "#008000",
|
||||
"name": "Vintage",
|
||||
"purple": "#800080",
|
||||
"red": "#800000",
|
||||
"selectionBackground": "#FFFFFF",
|
||||
"white": "#C0C0C0",
|
||||
"yellow": "#808000"
|
||||
}
|
||||
],
|
||||
"themes": [],
|
||||
"useAcrylicInTabRow": true,
|
||||
"wordDelimiters": " ()\"',;<>!@#$%^&*|+=[]{}~?\u2502"
|
||||
}
|
||||
Reference in New Issue
Block a user