From c76950293e24bcbeb94875382c18938fd77d37f5 Mon Sep 17 00:00:00 2001 From: Greg Lucas Date: Thu, 13 Mar 2014 11:48:50 -0400 Subject: [PATCH] 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. --- config/ConEmu.xml | 2 +- vendor/init.bat | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/config/ConEmu.xml b/config/ConEmu.xml index 2eab43a..a48eef4 100644 --- a/config/ConEmu.xml +++ b/config/ConEmu.xml @@ -488,7 +488,7 @@ - + diff --git a/vendor/init.bat b/vendor/init.bat index 1ca68e4..d799b99 100644 --- a/vendor/init.bat +++ b/vendor/init.bat @@ -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