mirror of
https://github.com/cmderdev/cmder.git
synced 2025-07-16 12:39:38 +08:00
Compare commits
38 Commits
Author | SHA1 | Date | |
---|---|---|---|
bc0db6a7b6 | |||
eb2444d04a | |||
f318bcc1b5 | |||
c56559873c | |||
e33713a93f | |||
324aaf74f2 | |||
d73f9592d8 | |||
bbb50f99f8 | |||
4efbe0bd62 | |||
476fd2d324 | |||
b3af7c3983 | |||
d82fece61e | |||
6bd2e260f0 | |||
c9d2b33792 | |||
9e87f375f1 | |||
84262c4476 | |||
0b01ea6f63 | |||
af6472cb57 | |||
fd12ece9af | |||
b5ae5eb711 | |||
c9e872e826 | |||
f99480fd49 | |||
834940cddb | |||
5135370ec1 | |||
92a3c9c215 | |||
f22943212b | |||
dc2bc9bda7 | |||
a03ad615f1 | |||
8b3f38ad21 | |||
9e55c48200 | |||
3b6e1cbf5f | |||
e1bf703f50 | |||
2e9b512102 | |||
9bbc97c981 | |||
4766425ad3 | |||
470808838f | |||
328f4b3073 | |||
691addb95c |
11
.github/dependabot.yml
vendored
Normal file
11
.github/dependabot.yml
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions" # See documentation for possible values
|
||||
directory: "/" # Location of package manifests
|
||||
schedule:
|
||||
interval: "weekly"
|
14
.github/workflows/build.yml
vendored
14
.github/workflows/build.yml
vendored
@ -8,6 +8,8 @@ name: Build Cmder
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
tags:
|
||||
- "v*"
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
|
||||
@ -72,3 +74,15 @@ jobs:
|
||||
with:
|
||||
path: build/hashes.txt
|
||||
name: hashes.txt
|
||||
|
||||
- name: Create Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: |
|
||||
build/cmder.zip
|
||||
build/cmder.7z
|
||||
build/cmder_mini.zip
|
||||
build/hashes.txt
|
||||
draft: true
|
||||
generate_release_notes: true
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
|
68
.github/workflows/codeql.yml
vendored
Normal file
68
.github/workflows/codeql.yml
vendored
Normal file
@ -0,0 +1,68 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ "master" ]
|
||||
schedule:
|
||||
- cron: '30 19 * * 0'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: windows-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'cpp' ]
|
||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
||||
# Use only 'java' to analyze code written in Java, Kotlin or both
|
||||
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
|
||||
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
|
||||
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
||||
# queries: security-extended,security-and-quality
|
||||
|
||||
- name: Add MSBuild to PATH
|
||||
uses: microsoft/setup-msbuild@v1
|
||||
|
||||
- name: Build Cmder Launcher
|
||||
shell: pwsh
|
||||
working-directory: scripts
|
||||
run: .\build.ps1 -Compile -verbose
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
with:
|
||||
category: "/language:${{matrix.language}}"
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -31,3 +31,4 @@ launcher/src/version.rc2
|
||||
.vs/*
|
||||
.vscode
|
||||
.idea
|
||||
.vagrant/
|
||||
|
64
Vagrantfile
vendored
Normal file
64
Vagrantfile
vendored
Normal file
@ -0,0 +1,64 @@
|
||||
Vagrant.configure("2") do |config|
|
||||
required_plugins = %w( vagrant-vbguest )
|
||||
required_plugins.each do |plugin|
|
||||
system "vagrant plugin install #{plugin}" unless Vagrant.has_plugin? plugin
|
||||
end
|
||||
|
||||
# config.vbguest.iso_path = "../../../../usr/share/virtualbox/VBoxGuestAdditions.iso"
|
||||
config.vbguest.allow_downgrade = true
|
||||
|
||||
config.vm.define "cmderdev-10" do |win10|
|
||||
win10.vm.hostname = "cmderdev-10"
|
||||
win10.vm.box = "cmderdev-10"
|
||||
|
||||
# win10.vm.network :private_network, ip: "192.168.56.101"
|
||||
|
||||
win10.vm.provider :virtualbox do |v|
|
||||
# v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
|
||||
v.customize ["modifyvm", :id, "--name", "cmderdev-10"]
|
||||
v.customize ["modifyvm", :id, "--ostype", "Windows10_64"]
|
||||
v.customize ["modifyvm", :id, "--graphicscontroller", "vboxsvga"]
|
||||
v.customize ["modifyvm", :id, "--memory", 8192]
|
||||
v.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
|
||||
#v.customize ["setextradata", :id, "GUI/ScaleFactor", "1.75"]
|
||||
end
|
||||
end
|
||||
|
||||
config.vm.define "cmderdev-11" do |win11|
|
||||
win11.vm.hostname = "cmderdev-11"
|
||||
win11.vm.box = "cmderdev-11"
|
||||
|
||||
# win11.vm.network :private_network, ip: "192.168.56.111"
|
||||
|
||||
win11.vm.provider :virtualbox do |v|
|
||||
# v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
|
||||
v.customize ["modifyvm", :id, "--name", "cmderdev-11"]
|
||||
v.customize ["modifyvm", :id, "--ostype", "Windows11_64"]
|
||||
v.customize ["modifyvm", :id, "--graphicscontroller", "vboxvga"]
|
||||
v.customize ["modifyvm", :id, "--memory", 8192]
|
||||
v.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
|
||||
#v.customize ["setextradata", :id, "GUI/ScaleFactor", "1.75"]
|
||||
end
|
||||
end
|
||||
|
||||
config.vm.define "cmderdev-10-pro-scaled" do |cmderdev|
|
||||
cmderdev.vm.hostname = 'cmderdev-10-pro'
|
||||
cmderdev.vm.box = "cmderdev-10"
|
||||
|
||||
cmderdev.vm.provider :virtualbox do |v|
|
||||
# v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
|
||||
v.customize ["modifyvm", :id, "--name", "cmderdev-pro"]
|
||||
v.customize ["modifyvm", :id, "--graphicscontroller", "vboxsvga"]
|
||||
v.customize ["modifyvm", :id, "--memory", 8192]
|
||||
v.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
|
||||
v.customize ["setextradata", :id, "GUI/ScaleFactor", "1.75"]
|
||||
end
|
||||
end
|
||||
|
||||
config.vm.provision "file", source: "./scripts/vagrant/windows_terminal_settings.json.default", destination: "windows_terminal_settings.json.default"
|
||||
config.vm.provision "file", source: "./scripts/vagrant/windows_terminal_state.json.default", destination: "windows_terminal_state.json.default"
|
||||
config.vm.provision "shell", path: './scripts/vagrant/add-cmder.ps1'
|
||||
config.vm.provision "shell", path: './vendor/bin/add-vscodeprofile.ps1'
|
||||
config.vm.provision "shell", path: './vendor/bin/add-windowsterminalprofiles.ps1'
|
||||
config.vm.provision "shell", path: './vendor/bin/add-cmdertodesktop.ps1'
|
||||
end
|
@ -425,11 +425,6 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
|
||||
swprintf_s(args, L"%s /single", args);
|
||||
}
|
||||
|
||||
if (!streqi(cmderTask.c_str(), L""))
|
||||
{
|
||||
swprintf_s(args, L"%s /run {%s}", args, cmderTask.c_str());
|
||||
}
|
||||
|
||||
if (!streqi(cmderTitle.c_str(), L""))
|
||||
{
|
||||
swprintf_s(args, L"%s /title \"%s\"", args, cmderTitle.c_str());
|
||||
@ -445,6 +440,14 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
|
||||
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)
|
||||
if (!streqi(cmderTask.c_str(), L""))
|
||||
{
|
||||
swprintf_s(args, L"%s /run {%s}", args, cmderTask.c_str());
|
||||
}
|
||||
|
||||
SetEnvironmentVariable(L"CMDER_ROOT", exeDir);
|
||||
if (wcscmp(userConfigDirPath, configDirPath) != 0)
|
||||
{
|
||||
|
@ -104,7 +104,7 @@ function Fetch-DownloadUrl {
|
||||
|
||||
$headers = @{}
|
||||
|
||||
if ($($env:GITHUB_TOKEN)) {
|
||||
if ($env:GITHUB_TOKEN) {
|
||||
$headers["Authorization"] = "token $($env:GITHUB_TOKEN)"
|
||||
}
|
||||
|
||||
|
40
scripts/vagrant/add-cmder.ps1
Normal file
40
scripts/vagrant/add-cmder.ps1
Normal file
@ -0,0 +1,40 @@
|
||||
choco install -y --force 7zip 7zip.install
|
||||
choco install -y --force cmder
|
||||
|
||||
$env:path = "$env:path;c:/tools/cmder/vendor/git-for-windows/cmd"
|
||||
c:
|
||||
cd $env:userprofile
|
||||
git clone https://github.com/cmderdev/cmder cmderdev
|
||||
write-host "USERNAME: $env:USERNAME"
|
||||
|
||||
if ("$env:USERNAME" -eq "vagrant" -and -not (test-path "$env:userprofile/cmderdev/vendor/git-for-windows")) {
|
||||
invoke-expression -command "TAKEOWN /F `"$env:userprofile/cmderdev`" /R /D y /s localhost /u vagrant /p vagrant"
|
||||
}
|
||||
|
||||
cd cmderdev
|
||||
git checkout vagrant
|
||||
git pull origin vagrant
|
||||
git remote add upstream https://github.com/cmderdev/cmder
|
||||
git pull upstream master
|
||||
|
||||
# cmd.exe "/K" '"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Auxiliary/Build/vcvars64.bat" && powershell -command "& ''$env:userprofile/cmderdev/scripts/build.ps1'' -verbose -compile" && exit'
|
||||
# copy $env:userprofile/cmderdev/launcher/x64/release/cmder.exe $env:userprofile/cmderdev
|
||||
# cmd.exe "/K" '"C:/Program Files (x86)/Microsoft Visual Studio/2022/Community/VC/Auxiliary/Build/vcvars64.bat" && powershell -noexit -command "& ''build.ps1 -verbose -compile''"'
|
||||
|
||||
cd scripts
|
||||
./build.ps1 -verbose
|
||||
|
||||
copy C:/Tools/Cmder/Cmder.exe $env:userprofile/cmderdev
|
||||
|
||||
# tabby
|
||||
setx cmder_root "${env:userprofile}\cmderdev"
|
||||
|
||||
# C:\Users\vagrant\AppData\Roaming\Hyper
|
||||
# // shell: '',
|
||||
# shell: 'cmd.exe',
|
||||
# // for setting shell arguments (i.e. for using interactive shellArgs: `['-i']`)
|
||||
# // by default `['--login']` will be used
|
||||
# // shellArgs: ['--login'],
|
||||
# shellArgs: ['/k', 'C:\\users\\vagrant\\cmderdev\\vendor\\init.bat'],
|
||||
|
||||
|
283
scripts/vagrant/windows_terminal_settings.json.default
Normal file
283
scripts/vagrant/windows_terminal_settings.json.default
Normal file
@ -0,0 +1,283 @@
|
||||
{
|
||||
"$help": "https://aka.ms/terminal-documentation",
|
||||
"$schema": "https://aka.ms/terminal-profiles-schema",
|
||||
"actions":
|
||||
[
|
||||
{
|
||||
"command":
|
||||
{
|
||||
"action": "copy",
|
||||
"singleLine": false
|
||||
},
|
||||
"keys": "ctrl+c"
|
||||
},
|
||||
{
|
||||
"command": "paste",
|
||||
"keys": "ctrl+v"
|
||||
},
|
||||
{
|
||||
"command": "find",
|
||||
"keys": "ctrl+shift+f"
|
||||
},
|
||||
{
|
||||
"command":
|
||||
{
|
||||
"action": "splitPane",
|
||||
"split": "auto",
|
||||
"splitMode": "duplicate"
|
||||
},
|
||||
"keys": "alt+shift+d"
|
||||
}
|
||||
],
|
||||
"copyFormatting": "none",
|
||||
"copyOnSelect": false,
|
||||
"defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
|
||||
"profiles":
|
||||
{
|
||||
"defaults": {},
|
||||
"list":
|
||||
[
|
||||
{
|
||||
"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"
|
||||
},
|
||||
{
|
||||
"guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
|
||||
"hidden": false,
|
||||
"name": "Azure Cloud Shell",
|
||||
"source": "Windows.Terminal.Azure"
|
||||
},
|
||||
{
|
||||
"guid": "{3b26d644-1d3b-5a0c-ab09-39d4dd9ae00e}",
|
||||
"hidden": false,
|
||||
"name": "Developer Command Prompt for VS 2022",
|
||||
"source": "Windows.Terminal.VisualStudio"
|
||||
},
|
||||
{
|
||||
"guid": "{589cd367-e65f-5e6a-a1c7-2b8d6f250da8}",
|
||||
"hidden": false,
|
||||
"name": "Developer PowerShell for VS 2022",
|
||||
"source": "Windows.Terminal.VisualStudio"
|
||||
}
|
||||
]
|
||||
},
|
||||
"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": "#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": []
|
||||
}
|
9
scripts/vagrant/windows_terminal_state.json.default
Normal file
9
scripts/vagrant/windows_terminal_state.json.default
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"generatedProfiles" :
|
||||
[
|
||||
"{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
|
||||
"{589cd367-e65f-5e6a-a1c7-2b8d6f250da8}",
|
||||
"{3b26d644-1d3b-5a0c-ab09-39d4dd9ae00e}"
|
||||
],
|
||||
"settingsHash" : "6e0f2330b78337f3-01d95614596b3f65"
|
||||
}
|
1
vendor/bin/add-cmderrootenvar.ps1
vendored
Normal file
1
vendor/bin/add-cmderrootenvar.ps1
vendored
Normal file
@ -0,0 +1 @@
|
||||
setx cmder_root "${env:cmder_root}"
|
30
vendor/bin/add-cmdertodesktop.ps1
vendored
Normal file
30
vendor/bin/add-cmdertodesktop.ps1
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
if (test-path "${env:USERPROFILE}\cmderdev") {
|
||||
$env:cmder_root = "${env:USERPROFILE}\cmderdev"
|
||||
write-host "Creating '${env:USERPROFILE}\Desktop\Cmderdev.lnk'..."
|
||||
|
||||
$setShortcut = "$env:cmder_root\vendor\bin\set-shortcut.ps1"
|
||||
|
||||
start-process -NoNewWindow -filePath "powershell.exe" -ArgumentList "-file `"${setShortcut}`" -sourceexe `"${env:cmder_root}\Cmder.exe`" -DestinationPath `"${env:USERPROFILE}\Desktop\Cmderdev.lnk`" -WorkingDirectory `"${env:cmder_root}`""
|
||||
}
|
||||
|
||||
if (test-path "${env:USERPROFILE}\cmder") {
|
||||
$env:cmder_root = "${env:USERPROFILE}\cmder"
|
||||
|
||||
if (test-path "${cmder_root}\vendor\bin\set-shortcut.ps1") {
|
||||
$setShortcut = "$env:cmder_root\vendor\bin\set-shortcut.ps1"
|
||||
}
|
||||
|
||||
write-host "Creating '${env:USERPROFILE}\Desktop\Cmder.lnk'..."
|
||||
start-process -NoNewWindow -filePath "powershell.exe" -ArgumentList "-file `"${setShortcut}`" -sourceexe `"$env:cmder_root\Cmder.exe`" -DestinationPath `"${env:USERPROFILE}\Desktop\Cmder.lnk`" -WorkingDirectory `"${env:USERPROFILE}`""
|
||||
} elseif (test-path "C:\tools\cmder") {
|
||||
$env:cmder_root = "C:\tools\cmder"
|
||||
|
||||
if (test-path "${cmder_root}\vendor\bin\set-shortcut.ps1") {
|
||||
$setShortcut = "$env:cmder_root\vendor\bin\set-shortcut.ps1"
|
||||
}
|
||||
|
||||
write-host "Creating '${env:USERPROFILE}\Desktop\Cmder.lnk'..."
|
||||
start-process -NoNewWindow -filePath "powershell.exe" -ArgumentList "-file `"${setShortcut}`" -sourceexe `"$env:cmder_root\Cmder.exe`" -DestinationPath `"${env:USERPROFILE}\Desktop\Cmder.lnk`" -WorkingDirectory `"${env:USERPROFILE}`""
|
||||
}
|
||||
|
||||
|
39
vendor/bin/add-vscodeprofile.ps1
vendored
Normal file
39
vendor/bin/add-vscodeprofile.ps1
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
# VSCode
|
||||
$VSCodeUserSettings = "$env:APPDATA/Code/User"
|
||||
$VSCodeSettings = "$VSCodeUserSettings/settings.json";
|
||||
$VSCodeSettingsNew = $VSCodeSettings.replace('.json', '-new.json')
|
||||
|
||||
if (test-path $VSCodeSettings) {
|
||||
$data = get-content -path $VSCodeSettings -ErrorAction silentlycontinue | out-string | ConvertFrom-Json
|
||||
}
|
||||
else {
|
||||
New-Item -ItemType directory $VSCodeUserSettings -force
|
||||
$data = @{}
|
||||
}
|
||||
|
||||
write-host $data
|
||||
|
||||
$data | Add-Member -force -Name 'terminal.integrated.defaultProfile.windows' -MemberType NoteProperty -Value "Cmder"
|
||||
|
||||
if ($null -eq $data.'terminal.integrated.profiles.windows') {
|
||||
write-host "Adding 'terminal.integrated.profiles.windows'..."
|
||||
$data | Add-Member -force -Name 'terminal.integrated.profiles.windows' -MemberType NoteProperty -Value @{}
|
||||
}
|
||||
|
||||
write-host "Adding 'terminal.integrated.profiles.windows.Cmder' profile..."
|
||||
$data.'terminal.integrated.profiles.windows'.'Cmder' = @{
|
||||
"name" = "Cmder";
|
||||
"path" = @(
|
||||
"`${env:windir}/Sysnative/cmd.exe";
|
||||
"`${env:windir}/System32/cmd.exe";
|
||||
);
|
||||
"args" = @(
|
||||
"/k";
|
||||
"`${env:USERPROFILE}/cmderdev/vendor/bin/vscode_init.cmd");
|
||||
"icon" = "terminal-cmd";
|
||||
"color" = "terminal.ansiGreen";
|
||||
};
|
||||
|
||||
$data | ConvertTo-Json -depth 100 | set-content $VSCodeSettings
|
||||
|
||||
|
74
vendor/bin/add-windowsterminalprofiles.ps1
vendored
Normal file
74
vendor/bin/add-windowsterminalprofiles.ps1
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
# Windows Terminal
|
||||
$windowsTerminalFolder = (dir "$env:userprofile/AppData/Local/Packages/Microsoft.WindowsTerminal_*").name
|
||||
$windowsTerminalPath = "$env:userprofile/AppData/Local/Packages/$windowsTerminalFolder"
|
||||
$windowsTerminalSettings = $windowsTerminalPath + '/localState/settings.json'
|
||||
$windowsTerminalSettingsNew = $windowsTerminalPath + '/localState/settings-new.json'
|
||||
|
||||
if (test-path "$env:userprofile/Documents/windows_terminal_settings.json.default") {
|
||||
if (test-path "$windowsTerminalPath/LocalState/settings.json") {
|
||||
del "$env:userprofile/Documents/windows_terminal_settings.json.default"
|
||||
} else {
|
||||
move-item -path $env:userprofile/Documents/windows_terminal_settings.json.default -destination $windowsTerminalPath/LocalState/settings.json
|
||||
}
|
||||
}
|
||||
|
||||
if (test-path "$env:userprofile/Documents/windows_terminal_state.json.default") {
|
||||
if (test-path "$windowsTerminalPath/LocalState/state.json") {
|
||||
del "$env:userprofile/Documents/windows_terminal_state.json.default"
|
||||
} else {
|
||||
move-item -path $env:userprofile/Documents/windows_terminal_state.json.default -destination $windowsTerminalPath/LocalState/state.json
|
||||
}
|
||||
}
|
||||
|
||||
if (test-path "$windowsTerminalPath/LocalState/state.json") {
|
||||
$json = get-content $windowsTerminalSettings | ConvertFrom-Json
|
||||
|
||||
$json.defaultProfile="{00000000-0000-0000-ba54-000000000132}"
|
||||
|
||||
$cmderFound = $false
|
||||
$cmderAsAdminFound = $false
|
||||
|
||||
foreach ($profile in $json.profiles.list) {
|
||||
if ($profile.Name -eq "Cmder") {
|
||||
$cmderFound = $true
|
||||
}
|
||||
elseIf ($profile.Name -eq "Cmder as Admin") {
|
||||
$cmderAsAdminFound = $true
|
||||
}
|
||||
}
|
||||
|
||||
if (-not $cmderFound) {
|
||||
write-host "Adding 'Cmder' to Windows Terminal..."
|
||||
|
||||
$json.profiles.list += @{
|
||||
commandline="cmd.exe /k `"%USERPROFILE%/cmderdev/vendor/init.bat`"";
|
||||
startingDirectory="%USERPROFILE%/cmderdev";
|
||||
icon="%USERPROFILE%/cmderdev/icons/cmder.ico";
|
||||
closeOnExit="graceful";
|
||||
guid="{00000000-0000-0000-ba54-000000000132}";
|
||||
hidden=$false;
|
||||
name="Cmder"
|
||||
}
|
||||
}
|
||||
|
||||
if (-not $cmderAsAdminFound) {
|
||||
write-host "Adding 'Cmder as Admin' to Windows Terminal..."
|
||||
|
||||
$json.profiles.list += @{
|
||||
commandline="cmd.exe /k `"%USERPROFILE%/cmderdev/vendor/init.bat`"";
|
||||
startingDirectory="%USERPROFILE%/cmderdev";
|
||||
icon="%USERPROFILE%/cmderdev/icons/cmder_red.ico";
|
||||
closeOnExit="graceful";
|
||||
guid="{00000000-0000-0000-ba54-000000000133}";
|
||||
hidden=$false;
|
||||
elevate=$true;
|
||||
name="Cmder as Admin"
|
||||
}
|
||||
}
|
||||
|
||||
$json | ConvertTo-Json -depth 100 | set-content $windowsTerminalSettings
|
||||
}
|
||||
else {
|
||||
write-host "Cannot add profiles for Windows Terminal. The Windows Terminal settings file does not exist!"
|
||||
}
|
||||
|
21
vendor/bin/set-shortcut.ps1
vendored
Normal file
21
vendor/bin/set-shortcut.ps1
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter()]
|
||||
[string]$SourceExe,
|
||||
[string]$Arguments,
|
||||
[string]$DestinationPath,
|
||||
[string]$WorkingDirectory,
|
||||
[String]$IconLocation
|
||||
)
|
||||
|
||||
if ($IconLocation -eq '') {
|
||||
$IconLocation = $SourceExe
|
||||
}
|
||||
|
||||
$WshShell = New-Object -comObject WScript.Shell
|
||||
$Shortcut = $WshShell.CreateShortcut($destinationPath)
|
||||
$Shortcut.TargetPath = $SourceExe
|
||||
$Shortcut.Arguments = $Arguments
|
||||
$shortcut.WorkingDirectory = $WorkingDirectory
|
||||
$shortcut.IconLocation = $IconLocation
|
||||
$Shortcut.Save()
|
6
vendor/clink_settings.default
vendored
6
vendor/clink_settings.default
vendored
@ -8,15 +8,15 @@ history.expand_mode = not_dquoted
|
||||
|
||||
# name: Skip adding lines prefixed with whitespace
|
||||
# type: boolean
|
||||
history.ignore_space = False
|
||||
history.ignore_space = True
|
||||
|
||||
# name: The number of history lines to save
|
||||
# type: integer
|
||||
history.max_lines = 10000
|
||||
history.max_lines = 25000
|
||||
|
||||
# name: Share history between instances
|
||||
# type: boolean
|
||||
history.shared = True
|
||||
history.shared = False
|
||||
|
||||
# name: Auto-answer terminate prompt
|
||||
# type: enum
|
||||
|
39
vendor/init.bat
vendored
39
vendor/init.bat
vendored
@ -148,7 +148,7 @@ if defined CMDER_USER_CONFIG (
|
||||
)
|
||||
|
||||
if not "%CMDER_SHELL%" == "cmd" (
|
||||
%print_warning% "Incompatible 'ComSpec/Shell' Detetected: %CMDER_SHELL%"
|
||||
%print_warning% "Incompatible 'ComSpec/Shell' Detected: %CMDER_SHELL%"
|
||||
set CMDER_CLINK=0
|
||||
set CMDER_ALIASES=0
|
||||
)
|
||||
@ -161,16 +161,24 @@ if "%PROCESSOR_ARCHITECTURE%"=="x86" (
|
||||
set clink_architecture=x64
|
||||
set architecture_bits=64
|
||||
) else (
|
||||
%print_warning% "Incompatible Processor Detetected: %PROCESSOR_ARCHITECTURE%"
|
||||
%print_warning% "Incompatible Processor Detected: %PROCESSOR_ARCHITECTURE%"
|
||||
set CMDER_CLINK=0
|
||||
)
|
||||
|
||||
if "%CMDER_CLINK%" == "1" (
|
||||
REM TODO: If clink is already injected, goto :CLINK_FINISH
|
||||
goto :INJECT_CLINK
|
||||
)
|
||||
|
||||
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" (
|
||||
%print_error% "Clink executable is not present in 'vendor\clink\clink_%clink_architecture%.exe'"
|
||||
goto :SKIP_CLINK
|
||||
)
|
||||
|
||||
:: Run Clink
|
||||
@ -185,7 +193,7 @@ if "%CMDER_CLINK%" == "1" (
|
||||
copy "%CMDER_ROOT%\vendor\cmder_prompt_config.lua.default" "%CMDER_CONFIG_DIR%\cmder_prompt_config.lua"
|
||||
)
|
||||
|
||||
:: Cleanup lagacy Clink Settings file
|
||||
:: Cleanup legacy Clink Settings file
|
||||
if exist "%CMDER_CONFIG_DIR%\settings" if exist "%CMDER_CONFIG_DIR%\clink_settings" (
|
||||
del "%CMDER_CONFIG_DIR%\settings"
|
||||
)
|
||||
@ -198,9 +206,12 @@ if "%CMDER_CLINK%" == "1" (
|
||||
"%CMDER_ROOT%\vendor\clink\clink_%clink_architecture%.exe" inject --quiet --profile "%CMDER_CONFIG_DIR%" --scripts "%CMDER_ROOT%\vendor"
|
||||
|
||||
if errorlevel 1 (
|
||||
%print_error% "Clink initilization has failed with error code: %errorlevel%"
|
||||
%print_error% "Clink initialization has failed with error code: %errorlevel%"
|
||||
)
|
||||
) else (
|
||||
|
||||
goto :CLINK_FINISH
|
||||
|
||||
:SKIP_CLINK
|
||||
%print_warning% "Skipping Clink Injection!"
|
||||
|
||||
for /f "tokens=2 delims=:." %%x in ('chcp') do set cp=%%x
|
||||
@ -210,7 +221,8 @@ if "%CMDER_CLINK%" == "1" (
|
||||
prompt $E[1;32;49m$P$S$_$E[1;30;49mλ$S$E[0m
|
||||
|
||||
chcp %cp%>nul
|
||||
)
|
||||
|
||||
:CLINK_FINISH
|
||||
|
||||
if "%CMDER_CONFIGURED%" GTR "1" (
|
||||
%print_verbose% "Cmder is already configured, skipping Cmder Init!"
|
||||
@ -237,6 +249,13 @@ if defined GIT_INSTALL_ROOT (
|
||||
%print_debug% init.bat "Skipping Git Auto-Detect!"
|
||||
goto :VENDORED_GIT
|
||||
)
|
||||
|
||||
%print_debug% init.bat "Fast init is enabled, vendored Git does not exist"
|
||||
for /F "delims=" %%F in ('where git.exe 2^>nul') do (
|
||||
set "EXT_GIT_EXE=%%~fF"
|
||||
%print_debug% init.bat "Found User installed Git at '%%~fF'. Skipping Git Auto-Detect!"
|
||||
goto :SET_ENV
|
||||
)
|
||||
)
|
||||
|
||||
%print_debug% init.bat "Looking for Git install root..."
|
||||
@ -309,6 +328,8 @@ if %nix_tools% geq 1 (
|
||||
)
|
||||
)
|
||||
|
||||
:SET_ENV
|
||||
|
||||
:: Plink (PuTTY Link) is a command-line connection tool similar to ssh, setting its protocol to ssh
|
||||
set PLINK_PROTOCOL=ssh
|
||||
|
||||
@ -316,6 +337,12 @@ set PLINK_PROTOCOL=ssh
|
||||
if not defined SVN_SSH set "SVN_SSH=%GIT_INSTALL_ROOT:\=\\%\\bin\\ssh.exe"
|
||||
|
||||
:: Find locale.exe: From the git install root, from the path, using the git installed env, or fallback using the env from the path.
|
||||
setlocal enabledelayedexpansion
|
||||
if not defined git_locale if defined EXT_GIT_EXE (
|
||||
set "GIT_INSTALL_ROOT=!EXT_GIT_EXE:\cmd\git.exe=!"
|
||||
)
|
||||
endlocal && set GIT_INSTALL_ROOT=%GIT_INSTALL_ROOT%
|
||||
|
||||
if not defined git_locale if exist "%GIT_INSTALL_ROOT%\usr\bin\locale.exe" set git_locale="%GIT_INSTALL_ROOT%\usr\bin\locale.exe"
|
||||
if not defined git_locale for /F "tokens=* delims=" %%F in ('where locale.exe 2^>nul') do ( if not defined git_locale set git_locale="%%F" )
|
||||
if not defined git_locale if exist "%GIT_INSTALL_ROOT%\usr\bin\env.exe" set git_locale="%GIT_INSTALL_ROOT%\usr\bin\env.exe" /usr/bin/locale
|
||||
|
2
vendor/lib/lib_console.cmd
vendored
2
vendor/lib/lib_console.cmd
vendored
@ -40,7 +40,7 @@ exit /b
|
||||
:::.
|
||||
:::-------------------------------------------------------------------------------
|
||||
|
||||
if %debug_output% gtr 0 echo DEBUG(%~1): %~2 & echo.
|
||||
if %debug_output% gtr 0 echo %time% DEBUG(%~1): %~2 & echo.
|
||||
exit /b
|
||||
|
||||
:verbose_output
|
||||
|
17
vendor/profile.ps1
vendored
17
vendor/profile.ps1
vendored
@ -5,7 +5,7 @@
|
||||
# !!! THIS FILE IS OVERWRITTEN WHEN CMDER IS UPDATED
|
||||
# !!! Use "%CMDER_ROOT%\config\user_profile.ps1" to add your own startup commands
|
||||
|
||||
$CMDER_INIT_START = $(Get-Date -UFormat %s)
|
||||
$CMDER_INIT_START = Get-Date
|
||||
|
||||
# Compatibility with PS major versions <= 2
|
||||
if (!$PSScriptRoot) {
|
||||
@ -123,11 +123,11 @@ if (-not (Test-Path -PathType container "$ENV:CMDER_ROOT\config\profile.d")) {
|
||||
|
||||
Push-Location $ENV:CMDER_ROOT\config\profile.d
|
||||
foreach ($x in Get-ChildItem *.psm1) {
|
||||
Write-Verbose Write-Host Sourcing $x
|
||||
Write-Verbose "Sourcing $x"
|
||||
Import-Module $x
|
||||
}
|
||||
foreach ($x in Get-ChildItem *.ps1) {
|
||||
Write-Verbose Write-Host Sourcing $x
|
||||
Write-Verbose "Sourcing $x"
|
||||
. $x
|
||||
}
|
||||
Pop-Location
|
||||
@ -137,11 +137,11 @@ Pop-Location
|
||||
if ($ENV:CMDER_USER_CONFIG -ne "" -and (Test-Path "$ENV:CMDER_USER_CONFIG\profile.d")) {
|
||||
Push-Location $ENV:CMDER_USER_CONFIG\profile.d
|
||||
foreach ($x in Get-ChildItem *.psm1) {
|
||||
Write-Verbose Write-Host Sourcing $x
|
||||
Write-Verbose "Sourcing $x"
|
||||
Import-Module $x
|
||||
}
|
||||
foreach ($x in Get-ChildItem *.ps1) {
|
||||
Write-Verbose Write-Host Sourcing $x
|
||||
Write-Verbose "Sourcing $x"
|
||||
. $x
|
||||
}
|
||||
Pop-Location
|
||||
@ -224,5 +224,8 @@ if ( $(Get-Command prompt).Definition -match 'PS \$\(\$executionContext.SessionS
|
||||
Set-Item -Path function:\prompt -Value $Prompt -Options ReadOnly
|
||||
}
|
||||
|
||||
$CMDER_INIT_END = $(Get-Date -UFormat %s)
|
||||
Write-Verbose "Elapsed Time: $(get-Date) `($($CMDER_INIT_END - $CMDER_INIT_START) total`)"
|
||||
$CMDER_INIT_END = Get-Date
|
||||
|
||||
$ElapsedTime = New-TimeSpan -Start $CMDER_INIT_START -End $CMDER_INIT_END
|
||||
|
||||
Write-Verbose "Elapsed Time: $($ElapsedTime.TotalSeconds) seconds total"
|
||||
|
12
vendor/sources.json
vendored
12
vendor/sources.json
vendored
@ -1,13 +1,13 @@
|
||||
[
|
||||
{
|
||||
"name": "git-for-windows",
|
||||
"version": "2.39.0.windows.1",
|
||||
"url": "https://github.com/git-for-windows/git/releases/download/v2.39.0.windows.1/PortableGit-2.39.0-64-bit.7z.exe"
|
||||
"version": "2.40.0-rc2.windows.1",
|
||||
"url": "https://github.com/git-for-windows/git/releases/download/v2.40.0-rc2.windows.1/PortableGit-2.40.0-rc2-64-bit.7z.exe"
|
||||
},
|
||||
{
|
||||
"name": "clink",
|
||||
"version": "1.4.4",
|
||||
"url": "https://github.com/chrisant996/clink/releases/download/v1.4.4/clink.1.4.4.7fe1ca.zip"
|
||||
"version": "1.4.22",
|
||||
"url": "https://github.com/chrisant996/clink/releases/download/v1.4.22/clink.1.4.22.33f515.zip"
|
||||
},
|
||||
{
|
||||
"name": "conemu-maximus5",
|
||||
@ -16,7 +16,7 @@
|
||||
},
|
||||
{
|
||||
"name": "clink-completions",
|
||||
"version": "0.4.2",
|
||||
"url": "https://github.com/vladimir-kotikov/clink-completions/archive/v0.4.2.zip"
|
||||
"version": "0.4.7",
|
||||
"url": "https://github.com/vladimir-kotikov/clink-completions/archive/v0.4.7.zip"
|
||||
}
|
||||
]
|
||||
|
Reference in New Issue
Block a user