2022-10-25 00:28:46 +08:00
|
|
|
|
# Init Script for PowerShell
|
|
|
|
|
# Created as part of Cmder project
|
2022-11-06 16:04:27 +08:00
|
|
|
|
# NOTE: This file must be saved using UTF-8 with BOM encoding for prompt symbol to work correctly.
|
2015-10-15 01:50:49 +08:00
|
|
|
|
|
|
|
|
|
# !!! THIS FILE IS OVERWRITTEN WHEN CMDER IS UPDATED
|
2018-09-01 06:02:56 +08:00
|
|
|
|
# !!! Use "%CMDER_ROOT%\config\user_profile.ps1" to add your own startup commands
|
2022-10-15 17:02:52 +08:00
|
|
|
|
|
|
|
|
|
$CMDER_INIT_START = $(Get-Date -UFormat %s)
|
2015-10-15 01:50:49 +08:00
|
|
|
|
|
2017-06-23 18:39:36 +08:00
|
|
|
|
# Compatibility with PS major versions <= 2
|
2022-10-15 17:02:52 +08:00
|
|
|
|
if (!$PSScriptRoot) {
|
2017-06-23 18:39:36 +08:00
|
|
|
|
$PSScriptRoot = Split-Path $Script:MyInvocation.MyCommand.Path
|
|
|
|
|
}
|
|
|
|
|
|
2018-03-13 23:38:27 +08:00
|
|
|
|
if ($ENV:CMDER_USER_CONFIG) {
|
2022-11-06 16:04:27 +08:00
|
|
|
|
Write-Verbose "CMDER IS ALSO USING INDIVIDUAL USER CONFIG FROM '$ENV:CMDER_USER_CONFIG'!"
|
2018-03-13 23:38:27 +08:00
|
|
|
|
}
|
|
|
|
|
|
2022-01-16 00:00:58 +08:00
|
|
|
|
# We do this for Powershell as Admin Sessions because CMDER_ROOT is not being set.
|
2022-10-25 00:28:46 +08:00
|
|
|
|
if (!$ENV:CMDER_ROOT) {
|
|
|
|
|
if ($ENV:ConEmuDir) {
|
2022-10-16 04:32:38 +08:00
|
|
|
|
$ENV:CMDER_ROOT = Resolve-Path($ENV:ConEmuDir + "\..\..")
|
2017-06-23 18:39:36 +08:00
|
|
|
|
} else {
|
2022-10-16 04:32:38 +08:00
|
|
|
|
$ENV:CMDER_ROOT = Resolve-Path($PSScriptRoot + "\..")
|
2017-06-23 18:39:36 +08:00
|
|
|
|
}
|
Added/enhanced bash with cmder.sh/user-cmder.sh, organized tasks menu
added personal files to .gitignore so they never get uploaded to the repo and added support for msys2 bash in the new git for windows
added autocreate of config/user-cmder.sh if iot does not exist and added it to the .gitignore
Added tasks: cmd::Cmder, cmd::Cmder as Admin, bash::bash, bash::bash as Admin, bash::mintty, bash::mintty as admin, powershell::powershell, powershell::powershell as Admin. Set default task to cmd::Cmder. Cot rid of init.bat running before /bin/bash, fixes double exit requirement
Added running git for windows post-install.bat on first cmder launch
fixed file/path not found errors when launching powershell as admin
fixed file/path not found errors when launching bash/mintty as admin
fixed PATH in vendor/cmder.sh
Added sourcing ~/.bashrc if it exists.
changed .gitignore to ignore anything with path of config/user-*
removed my personal files from .gitignore, left in config/user-*
Make sure $CMDER_ROOT does not have a trailing '/'
%CMDER_ROOT% does not have trailing '\'. allow user to specify a conemu.xml on the command line
Removed '\' from %CMDER_ROOT%
2015-11-09 11:25:42 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Remove trailing '\'
|
2022-10-25 00:28:46 +08:00
|
|
|
|
$ENV:CMDER_ROOT = ($ENV:CMDER_ROOT).TrimEnd("\")
|
Added/enhanced bash with cmder.sh/user-cmder.sh, organized tasks menu
added personal files to .gitignore so they never get uploaded to the repo and added support for msys2 bash in the new git for windows
added autocreate of config/user-cmder.sh if iot does not exist and added it to the .gitignore
Added tasks: cmd::Cmder, cmd::Cmder as Admin, bash::bash, bash::bash as Admin, bash::mintty, bash::mintty as admin, powershell::powershell, powershell::powershell as Admin. Set default task to cmd::Cmder. Cot rid of init.bat running before /bin/bash, fixes double exit requirement
Added running git for windows post-install.bat on first cmder launch
fixed file/path not found errors when launching powershell as admin
fixed file/path not found errors when launching bash/mintty as admin
fixed PATH in vendor/cmder.sh
Added sourcing ~/.bashrc if it exists.
changed .gitignore to ignore anything with path of config/user-*
removed my personal files from .gitignore, left in config/user-*
Make sure $CMDER_ROOT does not have a trailing '/'
%CMDER_ROOT% does not have trailing '\'. allow user to specify a conemu.xml on the command line
Removed '\' from %CMDER_ROOT%
2015-11-09 11:25:42 +08:00
|
|
|
|
|
2022-10-15 17:02:52 +08:00
|
|
|
|
# Do not load bundled PsGet if a module installer is already available
|
2017-07-14 17:30:19 +08:00
|
|
|
|
# -> recent PowerShell versions include PowerShellGet out of the box
|
2019-03-17 01:52:47 +08:00
|
|
|
|
$moduleInstallerAvailable = [bool](Get-Command -Name 'Install-Module' -ErrorAction SilentlyContinue)
|
2017-07-14 17:30:19 +08:00
|
|
|
|
|
2015-05-19 22:44:32 +08:00
|
|
|
|
# Add Cmder modules directory to the autoload path.
|
2015-03-18 23:33:55 +08:00
|
|
|
|
$CmderModulePath = Join-path $PSScriptRoot "psmodules/"
|
2014-09-17 15:55:15 +08:00
|
|
|
|
|
2022-10-15 17:02:52 +08:00
|
|
|
|
$CmderFunctions = Join-Path $CmderModulePath "Cmder.ps1"
|
2019-11-04 01:36:28 +08:00
|
|
|
|
. $CmderFunctions
|
|
|
|
|
|
2022-10-15 17:02:52 +08:00
|
|
|
|
if(-not $moduleInstallerAvailable -and -not $env:PSModulePath.Contains($CmderModulePath) ) {
|
2015-03-18 23:33:55 +08:00
|
|
|
|
$env:PSModulePath = $env:PSModulePath.Insert(0, "$CmderModulePath;")
|
2014-09-17 15:55:15 +08:00
|
|
|
|
}
|
|
|
|
|
|
2021-11-16 22:22:17 +08:00
|
|
|
|
$gitVersionVendor = (readVersion -gitPath "$ENV:CMDER_ROOT\vendor\git-for-windows\cmd")
|
2022-11-06 16:04:27 +08:00
|
|
|
|
Write-Debug "GIT VENDOR: ${gitVersionVendor}"
|
2021-11-16 22:22:17 +08:00
|
|
|
|
|
|
|
|
|
# Get user installed Git Version[s] and Compare with vendored if found.
|
2022-10-15 17:02:52 +08:00
|
|
|
|
foreach ($git in (Get-Command -ErrorAction SilentlyContinue 'git')) {
|
2022-11-06 16:04:27 +08:00
|
|
|
|
Write-Debug "GIT PATH: {$git.Path}"
|
2021-11-16 22:22:17 +08:00
|
|
|
|
$gitDir = Split-Path -Path $git.Path
|
|
|
|
|
$gitDir = isGitShim -gitPath $gitDir
|
|
|
|
|
$gitVersionUser = (readVersion -gitPath $gitDir)
|
2022-11-06 16:04:27 +08:00
|
|
|
|
Write-Debug "GIT USER: ${gitVersionUser}"
|
2021-11-16 22:22:17 +08:00
|
|
|
|
|
|
|
|
|
$useGitVersion = compare_git_versions -userVersion $gitVersionUser -vendorVersion $gitVersionVendor
|
2022-11-06 16:04:27 +08:00
|
|
|
|
Write-Debug "Using Git Version: ${useGitVersion}"
|
2021-11-16 22:22:17 +08:00
|
|
|
|
|
|
|
|
|
# Use user installed Git
|
2022-10-15 17:02:52 +08:00
|
|
|
|
if ($null -eq $gitPathUser) {
|
|
|
|
|
if ($gitDir -match '\\mingw32\\bin' -or $gitDir -match '\\mingw64\\bin') {
|
|
|
|
|
$gitPathUser = ($gitDir.subString(0,$gitDir.Length - 12))
|
|
|
|
|
} else {
|
|
|
|
|
$gitPathUser = ($gitDir.subString(0,$gitDir.Length - 4))
|
|
|
|
|
}
|
2021-11-16 22:22:17 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($useGitVersion -eq $gitVersionUser) {
|
2022-11-06 16:04:27 +08:00
|
|
|
|
Write-Debug "Using Git Dir: ${gitDir}"
|
2021-11-16 22:22:17 +08:00
|
|
|
|
$ENV:GIT_INSTALL_ROOT = $gitPathUser
|
|
|
|
|
$ENV:GIT_INSTALL_TYPE = 'USER'
|
|
|
|
|
break
|
2019-04-01 04:47:36 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-11-16 22:22:17 +08:00
|
|
|
|
# User vendored Git.
|
2022-10-15 17:02:52 +08:00
|
|
|
|
if ($null -eq $ENV:GIT_INSTALL_ROOT -and $null -ne $gitVersionVendor) {
|
2021-11-16 22:22:17 +08:00
|
|
|
|
$ENV:GIT_INSTALL_ROOT = "$ENV:CMDER_ROOT\vendor\git-for-windows"
|
|
|
|
|
$ENV:GIT_INSTALL_TYPE = 'VENDOR'
|
|
|
|
|
}
|
|
|
|
|
|
2022-11-06 16:04:27 +08:00
|
|
|
|
Write-Debug "GIT_INSTALL_ROOT: ${ENV:GIT_INSTALL_ROOT}"
|
|
|
|
|
Write-Debug "GIT_INSTALL_TYPE: ${ENV:GIT_INSTALL_TYPE}"
|
2021-11-16 22:22:17 +08:00
|
|
|
|
|
2022-11-06 16:04:27 +08:00
|
|
|
|
if ($null -ne $ENV:GIT_INSTALL_ROOT) {
|
2021-11-16 22:22:17 +08:00
|
|
|
|
$env:Path = Configure-Git -gitRoot "$ENV:GIT_INSTALL_ROOT" -gitType $ENV:GIT_INSTALL_TYPE -gitPathUser $gitPathUser
|
|
|
|
|
}
|
|
|
|
|
|
2022-10-25 00:28:46 +08:00
|
|
|
|
if (Get-Command -Name "vim" -ErrorAction SilentlyContinue) {
|
2022-10-15 17:02:52 +08:00
|
|
|
|
New-Alias -name "vi" -value vim
|
2019-04-01 04:47:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
2016-03-10 18:50:37 +08:00
|
|
|
|
if (Get-Module PSReadline -ErrorAction "SilentlyContinue") {
|
|
|
|
|
Set-PSReadlineOption -ExtraPromptLineCount 1
|
|
|
|
|
}
|
|
|
|
|
|
2022-10-15 17:02:52 +08:00
|
|
|
|
# Pre-assign default prompt hooks so the first run of cmder gets a working prompt.
|
2022-11-06 16:04:27 +08:00
|
|
|
|
$env:gitLoaded = $null
|
2019-10-22 23:17:13 +08:00
|
|
|
|
[ScriptBlock]$PrePrompt = {}
|
|
|
|
|
[ScriptBlock]$PostPrompt = {}
|
|
|
|
|
[ScriptBlock]$CmderPrompt = {
|
2022-11-06 16:04:27 +08:00
|
|
|
|
# Check if we're currently running under Admin privileges.
|
2022-10-25 00:28:46 +08:00
|
|
|
|
$identity = [Security.Principal.WindowsIdentity]::GetCurrent()
|
|
|
|
|
$principal = [Security.Principal.WindowsPrincipal] $identity
|
|
|
|
|
$adminRole = [Security.Principal.WindowsBuiltInRole]::Administrator
|
|
|
|
|
$color = "White"
|
|
|
|
|
if ($principal.IsInRole($adminRole)) { $color = "Red" }
|
2019-10-22 23:17:13 +08:00
|
|
|
|
$Host.UI.RawUI.ForegroundColor = "White"
|
2022-11-06 16:04:27 +08:00
|
|
|
|
Microsoft.PowerShell.Utility\Write-Host "PS " -NoNewline -ForegroundColor $color
|
2019-10-22 23:17:13 +08:00
|
|
|
|
Microsoft.PowerShell.Utility\Write-Host $pwd.ProviderPath -NoNewLine -ForegroundColor Green
|
2022-11-06 16:04:27 +08:00
|
|
|
|
checkGit($pwd.ProviderPath)
|
2022-10-15 17:02:52 +08:00
|
|
|
|
Microsoft.PowerShell.Utility\Write-Host "`nλ" -NoNewLine -ForegroundColor "DarkGray"
|
2019-10-22 23:17:13 +08:00
|
|
|
|
}
|
|
|
|
|
|
2015-08-03 22:06:41 +08:00
|
|
|
|
# Enhance Path
|
2018-11-02 21:00:41 +08:00
|
|
|
|
$env:Path = "$Env:CMDER_ROOT\bin;$Env:CMDER_ROOT\vendor\bin;$env:Path;$Env:CMDER_ROOT"
|
2015-10-15 00:50:52 +08:00
|
|
|
|
|
2017-03-01 06:25:11 +08:00
|
|
|
|
# Drop *.ps1 files into "$ENV:CMDER_ROOT\config\profile.d"
|
|
|
|
|
# to source them at startup.
|
2022-11-06 16:04:27 +08:00
|
|
|
|
if (-not (Test-Path -PathType container "$ENV:CMDER_ROOT\config\profile.d")) {
|
2022-10-15 17:02:52 +08:00
|
|
|
|
New-Item -ItemType Directory -Path "$ENV:CMDER_ROOT\config\profile.d"
|
2017-03-01 06:25:11 +08:00
|
|
|
|
}
|
|
|
|
|
|
2022-10-15 17:02:52 +08:00
|
|
|
|
Push-Location $ENV:CMDER_ROOT\config\profile.d
|
2018-11-18 08:55:24 +08:00
|
|
|
|
foreach ($x in Get-ChildItem *.psm1) {
|
2022-11-06 16:04:27 +08:00
|
|
|
|
Write-Verbose Write-Host Sourcing $x
|
2022-10-15 17:02:52 +08:00
|
|
|
|
Import-Module $x
|
2017-03-01 06:25:11 +08:00
|
|
|
|
}
|
2018-11-18 08:55:24 +08:00
|
|
|
|
foreach ($x in Get-ChildItem *.ps1) {
|
2022-11-06 16:04:27 +08:00
|
|
|
|
Write-Verbose Write-Host Sourcing $x
|
2022-10-15 17:02:52 +08:00
|
|
|
|
. $x
|
2018-11-18 08:55:24 +08:00
|
|
|
|
}
|
2022-10-15 17:02:52 +08:00
|
|
|
|
Pop-Location
|
2017-03-01 06:25:11 +08:00
|
|
|
|
|
2018-03-13 23:38:27 +08:00
|
|
|
|
# Drop *.ps1 files into "$ENV:CMDER_USER_CONFIG\config\profile.d"
|
|
|
|
|
# to source them at startup. Requires using cmder.exe /C [cmder_user_root_path] argument
|
2022-11-06 16:04:27 +08:00
|
|
|
|
if ($ENV:CMDER_USER_CONFIG -ne "" -and (Test-Path "$ENV:CMDER_USER_CONFIG\profile.d")) {
|
2022-10-15 17:02:52 +08:00
|
|
|
|
Push-Location $ENV:CMDER_USER_CONFIG\profile.d
|
2018-11-18 08:55:24 +08:00
|
|
|
|
foreach ($x in Get-ChildItem *.psm1) {
|
2022-11-06 16:04:27 +08:00
|
|
|
|
Write-Verbose Write-Host Sourcing $x
|
2022-10-15 17:02:52 +08:00
|
|
|
|
Import-Module $x
|
2018-03-13 23:38:27 +08:00
|
|
|
|
}
|
2018-11-18 08:55:24 +08:00
|
|
|
|
foreach ($x in Get-ChildItem *.ps1) {
|
2022-11-06 16:04:27 +08:00
|
|
|
|
Write-Verbose Write-Host Sourcing $x
|
2022-10-15 17:02:52 +08:00
|
|
|
|
. $x
|
2018-11-18 08:55:24 +08:00
|
|
|
|
}
|
2022-10-15 17:02:52 +08:00
|
|
|
|
Pop-Location
|
2018-03-13 23:38:27 +08:00
|
|
|
|
}
|
2019-03-17 01:52:47 +08:00
|
|
|
|
|
2018-09-01 06:02:56 +08:00
|
|
|
|
# Renaming to "config\user_profile.ps1" to "user_profile.ps1" for consistency.
|
2022-10-15 17:02:52 +08:00
|
|
|
|
if (Test-Path "$env:CMDER_ROOT\config\user-profile.ps1") {
|
|
|
|
|
Rename-Item "$env:CMDER_ROOT\config\user-profile.ps1" user_profile.ps1
|
2018-09-01 06:02:56 +08:00
|
|
|
|
}
|
2018-03-13 23:38:27 +08:00
|
|
|
|
|
2018-09-01 06:02:56 +08:00
|
|
|
|
$CmderUserProfilePath = Join-Path $env:CMDER_ROOT "config\user_profile.ps1"
|
2018-03-13 23:38:27 +08:00
|
|
|
|
if (Test-Path $CmderUserProfilePath) {
|
2015-10-15 00:50:52 +08:00
|
|
|
|
# Create this file and place your own command in there.
|
2018-11-18 08:55:24 +08:00
|
|
|
|
. "$CmderUserProfilePath" # user_profile.ps1 is not a module DO NOT USE import-module
|
2018-03-13 23:38:27 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($ENV:CMDER_USER_CONFIG) {
|
2018-09-01 06:02:56 +08:00
|
|
|
|
# Renaming to "$env:CMDER_USER_CONFIG\user-profile.ps1" to "user_profile.ps1" for consistency.
|
2022-10-15 17:02:52 +08:00
|
|
|
|
if (Test-Path "$env:CMDER_USER_CONFIG\user-profile.ps1") {
|
|
|
|
|
Rename-Item "$env:CMDER_USER_CONFIG\user-profile.ps1" user_profile.ps1
|
2018-09-01 06:02:56 +08:00
|
|
|
|
}
|
|
|
|
|
|
2018-11-02 21:00:41 +08:00
|
|
|
|
$env:Path = "$Env:CMDER_USER_CONFIG\bin;$env:Path"
|
|
|
|
|
|
2018-09-01 06:02:56 +08:00
|
|
|
|
$CmderUserProfilePath = Join-Path $ENV:CMDER_USER_CONFIG "user_profile.ps1"
|
2018-06-03 06:15:33 +08:00
|
|
|
|
if (Test-Path $CmderUserProfilePath) {
|
2022-10-15 17:02:52 +08:00
|
|
|
|
. "$CmderUserProfilePath" # user_profile.ps1 is not a module DO NOT USE import-module
|
2018-06-03 06:15:33 +08:00
|
|
|
|
}
|
2018-03-13 23:38:27 +08:00
|
|
|
|
}
|
|
|
|
|
|
2022-11-06 16:04:27 +08:00
|
|
|
|
if (-not (Test-Path $CmderUserProfilePath)) {
|
|
|
|
|
$CmderUserProfilePath = $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($CmderUserProfilePath)
|
|
|
|
|
Write-Host -NoNewline "`r"
|
|
|
|
|
Write-Host -BackgroundColor Green -ForegroundColor Black "First Run: Creating user startup file: $CmderUserProfilePath"
|
2018-12-14 04:13:17 +08:00
|
|
|
|
Copy-Item "$env:CMDER_ROOT\vendor\user_profile.ps1.default" -Destination $CmderUserProfilePath
|
2016-05-12 20:26:18 +08:00
|
|
|
|
}
|
|
|
|
|
|
2019-03-24 03:03:44 +08:00
|
|
|
|
#
|
|
|
|
|
# Prompt Section
|
|
|
|
|
# Users should modify their user_profile.ps1 as it will be safe from updates.
|
|
|
|
|
#
|
|
|
|
|
|
2019-03-17 01:52:47 +08:00
|
|
|
|
# Only set the prompt if it is currently set to the default
|
|
|
|
|
# This allows users to configure the prompt in their user_profile.ps1 or config\profile.d\*.ps1
|
2022-10-15 17:02:52 +08:00
|
|
|
|
if ( $(Get-Command prompt).Definition -match 'PS \$\(\$executionContext.SessionState.Path.CurrentLocation\)\$\(' -and `
|
|
|
|
|
$(Get-Command prompt).Definition -match '\(\$nestedPromptLevel \+ 1\)\) ";') {
|
|
|
|
|
|
|
|
|
|
<#
|
|
|
|
|
This scriptblock runs every time the prompt is returned.
|
|
|
|
|
Explicitly use functions from MS namespace to protect from being overridden in the user session.
|
|
|
|
|
Custom prompt functions are loaded in as constants to get the same behaviour
|
|
|
|
|
#>
|
|
|
|
|
[ScriptBlock]$Prompt = {
|
2022-10-25 00:28:46 +08:00
|
|
|
|
$lastSUCCESS = $?
|
2022-11-07 03:49:01 +08:00
|
|
|
|
$realLastExitCode = $LastExitCode
|
2022-10-15 17:02:52 +08:00
|
|
|
|
$host.UI.RawUI.WindowTitle = Microsoft.PowerShell.Management\Split-Path $pwd.ProviderPath -Leaf
|
2022-10-25 00:28:46 +08:00
|
|
|
|
Microsoft.PowerShell.Utility\Write-Host -NoNewline "$([char]0x200B)`r$([char]0x1B)[K"
|
2022-11-07 03:49:01 +08:00
|
|
|
|
if ($lastSUCCESS -or ($LastExitCode -ne 0)) {
|
2022-10-25 00:28:46 +08:00
|
|
|
|
Microsoft.PowerShell.Utility\Write-Host
|
|
|
|
|
}
|
2022-10-15 17:02:52 +08:00
|
|
|
|
PrePrompt | Microsoft.PowerShell.Utility\Write-Host -NoNewline
|
|
|
|
|
CmderPrompt
|
|
|
|
|
PostPrompt | Microsoft.PowerShell.Utility\Write-Host -NoNewline
|
2022-11-07 03:49:01 +08:00
|
|
|
|
$global:LastExitCode = $realLastExitCode
|
2022-10-15 17:02:52 +08:00
|
|
|
|
return " "
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Once Created these code blocks cannot be overwritten
|
2022-10-25 00:28:46 +08:00
|
|
|
|
# if (-not $(Get-Command PrePrompt).Options -match 'Constant') {Set-Item -Path function:\PrePrompt -Value $PrePrompt -Options Constant}
|
2022-10-15 17:02:52 +08:00
|
|
|
|
# if (-not $(Get-Command CmderPrompt).Options -match 'Constant') {Set-Item -Path function:\CmderPrompt -Value $CmderPrompt -Options Constant}
|
2022-10-25 00:28:46 +08:00
|
|
|
|
# if (-not $(Get-Command PostPrompt).Options -match 'Constant') {Set-Item -Path function:\PostPrompt -Value $PostPrompt -Options Constant}
|
2022-10-15 17:02:52 +08:00
|
|
|
|
|
|
|
|
|
Set-Item -Path function:\PrePrompt -Value $PrePrompt -Options Constant
|
|
|
|
|
Set-Item -Path function:\CmderPrompt -Value $CmderPrompt -Options Constant
|
|
|
|
|
Set-Item -Path function:\PostPrompt -Value $PostPrompt -Options Constant
|
|
|
|
|
|
|
|
|
|
# Functions can be made constant only at creation time
|
|
|
|
|
# ReadOnly at least requires `-force` to be overwritten
|
|
|
|
|
# if (!$(Get-Command Prompt).Options -match 'ReadOnly') {Set-Item -Path function:\prompt -Value $Prompt -Options ReadOnly}
|
|
|
|
|
Set-Item -Path function:\prompt -Value $Prompt -Options ReadOnly
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$CMDER_INIT_END = $(Get-Date -UFormat %s)
|
2022-10-25 00:28:46 +08:00
|
|
|
|
Write-Verbose "Elapsed Time: $(get-Date) `($($CMDER_INIT_END - $CMDER_INIT_START) total`)"
|