From 0ab9b74013b4fa7ee8a0874bb10f05a75cab6eda Mon Sep 17 00:00:00 2001 From: Pireax Date: Wed, 14 Oct 2015 18:50:52 +0200 Subject: [PATCH] Add user startup file for powershell --- vendor/profile.ps1 | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/vendor/profile.ps1 b/vendor/profile.ps1 index 905b4b7..6c7270a 100644 --- a/vendor/profile.ps1 +++ b/vendor/profile.ps1 @@ -62,4 +62,14 @@ if (Test-Path Env:\CMDER_START) { } # Enhance Path -$env:Path = "$Env:CMDER_ROOT\bin;$env:Path;$Env:CMDER_ROOT" \ No newline at end of file +$env:Path = "$Env:CMDER_ROOT\bin;$env:Path;$Env:CMDER_ROOT" + + +$CmderUserProfilePath = Join-Path $env:CMDER_ROOT "config/user-profile.ps1" +if(Test-Path $CmderUserProfilePath) { + # Create this file and place your own command in there. + Invoke-Expression $CmderUserProfilePath +} else { + Write-Host "Creating user startup file: $CmderUserProfilePath" + "# Use this file to run your own startup commands" | Out-File $CmderUserProfilePath +} \ No newline at end of file