mirror of
				https://github.com/cmderdev/cmder.git
				synced 2025-10-31 01:12:11 +08:00 
			
		
		
		
	cleanup
This commit is contained in:
		
							
								
								
									
										12
									
								
								vendor/profile.ps1
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								vendor/profile.ps1
									
									
									
									
										vendored
									
									
								
							| @@ -25,7 +25,7 @@ if (! $ENV:CMDER_ROOT ) { | ||||
| # Remove trailing '\' | ||||
| $ENV:CMDER_ROOT = (($ENV:CMDER_ROOT).trimend("\")) | ||||
|  | ||||
| # do not load bundled psget if a module installer is already available | ||||
| # Do not load bundled psget if a module installer is already available | ||||
| # -> recent PowerShell versions include PowerShellGet out of the box | ||||
| $moduleInstallerAvailable = [bool](Get-Command -Name 'Install-Module' -ErrorAction SilentlyContinue) | ||||
|  | ||||
| @@ -91,11 +91,6 @@ if (Get-Module PSReadline -ErrorAction "SilentlyContinue") { | ||||
| # Enhance Path | ||||
| $env:Path = "$Env:CMDER_ROOT\bin;$Env:CMDER_ROOT\vendor\bin;$env:Path;$Env:CMDER_ROOT" | ||||
|  | ||||
| # | ||||
| # Prompt Section | ||||
| #   Users should modify their user_profile.ps1 as it will be safe from updates. | ||||
| # | ||||
|  | ||||
| # Drop *.ps1 files into "$ENV:CMDER_ROOT\config\profile.d" | ||||
| # to source them at startup. | ||||
| if (-not (test-path "$ENV:CMDER_ROOT\config\profile.d")) { | ||||
| @@ -160,6 +155,11 @@ if (! (Test-Path $CmderUserProfilePath) ) { | ||||
|     Copy-Item "$env:CMDER_ROOT\vendor\user_profile.ps1.default" -Destination $CmderUserProfilePath | ||||
| } | ||||
|  | ||||
| # | ||||
| # Prompt Section | ||||
| #   Users should modify their user_profile.ps1 as it will be safe from updates. | ||||
| # | ||||
|  | ||||
| # 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 | ||||
| if ( $(get-command prompt).Definition -match 'PS \$\(\$executionContext.SessionState.Path.CurrentLocation\)\$\(' -and ` | ||||
|   | ||||
		Reference in New Issue
	
	Block a user