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:
Greg Lucas
2014-03-13 11:48:50 -04:00
parent 7688823886
commit c76950293e
2 changed files with 6 additions and 1 deletions

5
vendor/init.bat vendored
View File

@ -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