mirror of
https://github.com/cmderdev/cmder.git
synced 2025-06-16 22:57:49 +08:00
cmd: change the prompt in lua
This keeps the PROMPT variable as is and changes the prompt to the cmder style in the clink code. This has two advantages: * opening a cmd in a cmder session will now show the old prompt code instead of a ugly raw prompt without the replacements. This led to ugly output when a batch file echoed their content (e.g `conda build recipe/`). * when a command rewrites the prompt (e.g. an activate in a virtualenv), these command sometimes simply overwrites the PROMPT so that the cmder enhancements were not anymore in place. Now we simply don't care and overwrite it with our stuff in the clink part. This might mean that a user has to install a lua script so that e.g. conda environments are visible on the prompt.
This commit is contained in:
4
vendor/init.bat
vendored
4
vendor/init.bat
vendored
@ -17,10 +17,6 @@ if not defined CMDER_ROOT (
|
||||
:: Remove trailing '\'
|
||||
if "%CMDER_ROOT:~-1%" == "\" SET "CMDER_ROOT=%CMDER_ROOT:~0,-1%"
|
||||
|
||||
:: Change the prompt style
|
||||
:: Mmm tasty lamb
|
||||
prompt $E[1;32;40m$P$S{git}{hg}$S$_$E[1;30;40m{lamb}$S$E[0m
|
||||
|
||||
:: Pick right version of clink
|
||||
if "%PROCESSOR_ARCHITECTURE%"=="x86" (
|
||||
set architecture=86
|
||||
|
Reference in New Issue
Block a user