mirror of
https://github.com/cmderdev/cmder.git
synced 2025-06-16 14:47:49 +08:00
Use default files for default user profiles
This commit is contained in:
37
vendor/profile.ps1
vendored
37
vendor/profile.ps1
vendored
@ -181,41 +181,8 @@ if ($ENV:CMDER_USER_CONFIG) {
|
||||
}
|
||||
|
||||
if (! (Test-Path $CmderUserProfilePath) ) {
|
||||
# This multiline string cannot be indented, for this reason I've not indented the whole block
|
||||
|
||||
Write-Host -BackgroundColor Darkgreen -ForegroundColor White "First Run: Creating user startup file: $CmderUserProfilePath"
|
||||
|
||||
$UserProfileTemplate = @'
|
||||
# Use this file to run your own startup commands
|
||||
|
||||
## Prompt Customization
|
||||
<#
|
||||
.SYNTAX
|
||||
<PrePrompt><CMDER DEFAULT>
|
||||
λ <PostPrompt> <repl input>
|
||||
.EXAMPLE
|
||||
<PrePrompt>N:\Documents\src\cmder [master]
|
||||
λ <PostPrompt> |
|
||||
#>
|
||||
|
||||
[ScriptBlock]$PrePrompt = {
|
||||
|
||||
}
|
||||
|
||||
# Replace the cmder prompt entirely with this.
|
||||
# [ScriptBlock]$CmderPrompt = {}
|
||||
|
||||
[ScriptBlock]$PostPrompt = {
|
||||
|
||||
}
|
||||
|
||||
## <Continue to add your own>
|
||||
|
||||
|
||||
'@
|
||||
|
||||
New-Item -ItemType File -Path $CmderUserProfilePath -Value $UserProfileTemplate > $null
|
||||
|
||||
Write-Host -BackgroundColor Darkgreen -ForegroundColor White "First Run: Creating user startup file: $CmderUserProfilePath"
|
||||
Copy-Item "$env:CMDER_ROOT\vendor\user_profile.ps1.default" -Destination $CmderUserProfilePath
|
||||
}
|
||||
|
||||
# Once Created these code blocks cannot be overwritten
|
||||
|
Reference in New Issue
Block a user