mirror of
https://github.com/cmderdev/cmder.git
synced 2025-01-11 00:39:08 +08:00
31c8c620c7
Add a pre and post function hook around the Cmder prompt. Specify the cmder prompt as a function that could be replaced by a user. Write a friendly message when the user profile template is created. Create the user profile with cmder prompt hooks ready to use. It was concerning to run any function with a specific name every prompt with no guarantee it remains what it was initally created as. Core functions have been explicitly called from their namespace like Microsoft.PowerShell.Utility\Write-Host to try and prevent clobbering. User supplied functions are passed in as script blocks, created as the session runs the profile script. By creating them as constants these function names cannot be declared again for the duration of the process. Since the prompt function already exists by this time, set the readOnly flag so to re-declare the prompt requires the use of -force. It is hoped these changes limit what could be the risk of any script redefining functions that are called automatically without user intent or input. |
||
---|---|---|
.. | ||
psmodules/PsGet | ||
clink.lua | ||
cmder_exinit | ||
cmder.sh | ||
git-prompt.sh | ||
init.bat | ||
profile.ps1 | ||
Readme.md | ||
sources.json | ||
user-aliases.cmd.example |
Vendor
Third parties software & init script.