From 340b70999c95c96dbb0f420c00e0c89572ef3c7c Mon Sep 17 00:00:00 2001 From: adam j hartz Date: Wed, 2 Mar 2016 16:45:43 -0500 Subject: [PATCH 1/2] better check for avoiding double-wrapping --- xonsh/execer.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xonsh/execer.py b/xonsh/execer.py index 372a3d516..6065d32b1 100644 --- a/xonsh/execer.py +++ b/xonsh/execer.py @@ -185,15 +185,15 @@ class Execer(object): if prev_indent == curr_indent: raise original_error maxcol = self._find_next_break(line, last_error_col) - if line.startswith('$['): - # if we have already wrapped this in subproc tokens - # and it still doesn't work, adding more won't help - # anything - raise original_error sbpline = subproc_toks(line, returnline=True, maxcol=maxcol, lexer=self.parser.lexer) + if line.startswith('$[$['): + # if we have already wrapped this in subproc tokens + # and it still doesn't work, adding more won't help + # anything + raise original_error if sbpline is None: # subprocess line had no valid tokens, likely because # it only contained a comment. From 5ca7d340e814bd971402f1a57202d868826dd7a9 Mon Sep 17 00:00:00 2001 From: adam j hartz Date: Wed, 2 Mar 2016 17:42:34 -0500 Subject: [PATCH 2/2] oops --- xonsh/execer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xonsh/execer.py b/xonsh/execer.py index 6065d32b1..3b7650b5b 100644 --- a/xonsh/execer.py +++ b/xonsh/execer.py @@ -189,7 +189,7 @@ class Execer(object): returnline=True, maxcol=maxcol, lexer=self.parser.lexer) - if line.startswith('$[$['): + if sbpline.startswith('$[$['): # if we have already wrapped this in subproc tokens # and it still doesn't work, adding more won't help # anything