mirror of
https://github.com/cmderdev/cmder.git
synced 2025-06-14 05:37:51 +08:00
Find cmder files when running as Administrator.
When starting a shell as Administrator, the CMDER_ROOT variable is not propagated from the parent (non-Admin) environment. Fix this by using paths relative to %ConEmuDir%. Fixes issue #94.
This commit is contained in:
5
vendor/init.bat
vendored
5
vendor/init.bat
vendored
@ -2,6 +2,11 @@
|
||||
:: Sets some nice defaults
|
||||
:: Created as part of cmder project
|
||||
|
||||
:: Find root dir
|
||||
@if not defined CMDER_ROOT (
|
||||
for /f %%i in ("%ConEmuDir%\..\..") do @set CMDER_ROOT="%%~fi"
|
||||
)
|
||||
|
||||
:: Change the prompt style
|
||||
:: Mmm tasty lamb
|
||||
@prompt $E[1;32;40m$P$S{git}$S$_$E[1;30;40m{lamb}$S$E[0m
|
||||
|
Reference in New Issue
Block a user