mirror of
https://github.com/cmderdev/cmder.git
synced 2025-09-17 03:33:14 +08:00
Compare commits
3 Commits
copilot/fi
...
copilot/fi
Author | SHA1 | Date | |
---|---|---|---|
545331a336 | |||
08ce81609a | |||
218400a4b8 |
@ -352,6 +352,8 @@ 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.
|
||||
|
||||
For instructions on how to integrate Cmder with your IDE, please read our [Wiki section](https://github.com/cmderdev/cmder/wiki#cmder-integration).
|
||||
|
||||
## Upgrading
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
Skip all downloads and only build launcher.
|
||||
.EXAMPLE
|
||||
.\build.ps1 -verbose
|
||||
.\build -verbose
|
||||
|
||||
Execute the build and see what's going on.
|
||||
.EXAMPLE
|
||||
@ -33,7 +33,7 @@
|
||||
Samuel Vasko, Jack Bennett
|
||||
Part of the Cmder project.
|
||||
.LINK
|
||||
https://github.com/cmderdev/cmder - Project Home
|
||||
http://cmder.app/ - Project Home
|
||||
#>
|
||||
[CmdletBinding(SupportsShouldProcess = $true)]
|
||||
Param(
|
||||
|
@ -35,7 +35,7 @@ Param(
|
||||
[string]$saveTo = "$PSScriptRoot\..\build"
|
||||
)
|
||||
|
||||
$cmder_root = Resolve-Path $cmderRoot
|
||||
$cmderRoot = Resolve-Path $cmderRoot
|
||||
|
||||
. "$PSScriptRoot\utils.ps1"
|
||||
$ErrorActionPreference = "Stop"
|
||||
@ -47,10 +47,10 @@ $targets = @{
|
||||
"cmder_mini.zip" = "-xr!`"vendor\git-for-windows`"";
|
||||
}
|
||||
|
||||
Push-Location -Path $cmder_root
|
||||
Push-Location -Path $cmderRoot
|
||||
|
||||
Delete-Existing "$cmder_root\Version*"
|
||||
Delete-Existing "$cmder_root\build\*"
|
||||
Delete-Existing "$cmderRoot\Version*"
|
||||
Delete-Existing "$cmderRoot\build\*"
|
||||
|
||||
if (-not (Test-Path -PathType container $saveTo)) {
|
||||
(New-Item -ItemType Directory -Path $saveTo) | Out-Null
|
||||
@ -59,16 +59,16 @@ if (-not (Test-Path -PathType container $saveTo)) {
|
||||
$saveTo = Resolve-Path $saveTo
|
||||
|
||||
$version = Get-VersionStr
|
||||
(New-Item -ItemType file "$cmder_root\Version $version") | Out-Null
|
||||
(New-Item -ItemType file "$cmderRoot\Version $version") | Out-Null
|
||||
|
||||
if ($PSCmdlet.MyInvocation.BoundParameters["Verbose"].IsPresent) {
|
||||
Write-Verbose "Packing Cmder $version in $saveTo..."
|
||||
$excluded = (Get-Content -Path "$cmder_root\packignore") -Split [System.Environment]::NewLine | Where-Object { $_ }
|
||||
Get-ChildItem $cmder_root -Force -Exclude $excluded
|
||||
$excluded = (Get-Content -Path "$cmderRoot\packignore") -Split [System.Environment]::NewLine | Where-Object { $_ }
|
||||
Get-ChildItem $cmderRoot -Force -Exclude $excluded
|
||||
}
|
||||
|
||||
foreach ($t in $targets.GetEnumerator()) {
|
||||
Create-Archive "$cmder_root" "$saveTo\$($t.Name)" $t.Value
|
||||
Create-Archive "$cmderRoot" "$saveTo\$($t.Name)" $t.Value
|
||||
$hash = (Digest-Hash "$saveTo\$($t.Name)")
|
||||
Add-Content -path "$saveTo\hashes.txt" -value ($t.Name + ' ' + $hash)
|
||||
}
|
||||
|
@ -5,17 +5,17 @@
|
||||
This script updates dependencies to the latest version in vendor/sources.json file.
|
||||
|
||||
You will need to make this script executable by setting your Powershell Execution Policy to Remote signed
|
||||
Then unblock the script for execution with UnblockFile .\update.ps1
|
||||
Then unblock the script for execution with UnblockFile .\build.ps1
|
||||
.EXAMPLE
|
||||
.\update.ps1
|
||||
.\build.ps1
|
||||
|
||||
Updates the dependency sources in the default location, the vendor/sources.json file.
|
||||
.EXAMPLE
|
||||
.\update.ps1 -verbose
|
||||
.\build -verbose
|
||||
|
||||
Updates the dependency sources and see what's going on.
|
||||
.EXAMPLE
|
||||
.\update.ps1 -SourcesPath '~/custom/vendors.json'
|
||||
.\build.ps1 -SourcesPath '~/custom/vendors.json'
|
||||
|
||||
Specify the path to update dependency sources file at.
|
||||
.NOTES
|
||||
@ -23,7 +23,7 @@
|
||||
David Refoua <David@Refoua.me>
|
||||
Part of the Cmder project.
|
||||
.LINK
|
||||
https://github.com/cmderdev/cmder - Project Home
|
||||
http://cmder.app/ - Project Home
|
||||
#>
|
||||
[CmdletBinding(SupportsShouldProcess = $true)]
|
||||
Param(
|
||||
|
@ -1,6 +1,7 @@
|
||||
function Ensure-Exists($path) {
|
||||
if (-not (Test-Path $path)) {
|
||||
throw "Missing required $path! Ensure it is installed"
|
||||
Write-Error "Missing required $path! Ensure it is installed"
|
||||
exit 1
|
||||
}
|
||||
return $true > $null
|
||||
}
|
||||
@ -15,7 +16,8 @@ function Ensure-Executable($command) {
|
||||
Set-Alias -Name "7z" -Value "$env:programw6432\7-zip\7z.exe" -Scope script
|
||||
}
|
||||
else {
|
||||
throw "Missing $command! Ensure it is installed and on in the PATH"
|
||||
Write-Error "Missing $command! Ensure it is installed and on in the PATH"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
9
vendor/profile.ps1
vendored
9
vendor/profile.ps1
vendored
@ -196,6 +196,15 @@ 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]27)]9;9;`"$($loc.ProviderPath)`"$([char]27)\"
|
||||
}
|
||||
|
||||
$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)) {
|
||||
|
Reference in New Issue
Block a user