From 8e3c106284d21e281edb527049c7d0bf76fdbb2d Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Sun, 15 Apr 2012 17:00:01 +0000 Subject: Minor tweak to the shell-execute substring parser. You can escape close parens now inside of a substring shell-execute. It's a little confusing, so i'm not 100% sure it's working right quite yet :-P --- src/context.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/context.cpp b/src/context.cpp index ce1dfee..22bea57 100644 --- a/src/context.cpp +++ b/src/context.cpp @@ -212,9 +212,20 @@ Bu::String Context::expand( const Bu::String &sInS ) } else if( *b == '(' && iPass == 1 ) { + Bu::String sCmd; b++; - e = b.find(')'); - Bu::String sCmd( b, e ); + for( e = b; e != ')'; e++ ) + { + if( *e == '\\' && *(e+1) == ')' ) + { + sCmd += ')'; + e++; + } + else + sCmd += *e; + } + //e = b.find(')'); +// Bu::String sCmd( b, e ); Bu::String sBuf; try { -- cgit v1.2.3