mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
some more ideas
This commit is contained in:
parent
f7f62bd2fb
commit
48ec7a38c7
1 changed files with 13 additions and 0 deletions
|
@ -2960,6 +2960,8 @@ class BaseParser(object):
|
||||||
x = ensure_list_from_str_or_list(arg, lineno=lineno, col=col)
|
x = ensure_list_from_str_or_list(arg, lineno=lineno, col=col)
|
||||||
cliargs = binop(cliargs, ast.Add(), x, lineno=lineno, col=col)
|
cliargs = binop(cliargs, ast.Add(), x, lineno=lineno, col=col)
|
||||||
currlist = None
|
currlist = None
|
||||||
|
elif action == "skip":
|
||||||
|
pass
|
||||||
else:
|
else:
|
||||||
raise ValueError("action not understood: " + action)
|
raise ValueError("action not understood: " + action)
|
||||||
del arg._cliarg_action
|
del arg._cliarg_action
|
||||||
|
@ -3045,6 +3047,17 @@ class BaseParser(object):
|
||||||
node = ast.Str(s=s, lineno=beg[0], col_offset=beg[1])
|
node = ast.Str(s=s, lineno=beg[0], col_offset=beg[1])
|
||||||
p[2][-1].elts.append(node)
|
p[2][-1].elts.append(node)
|
||||||
|
|
||||||
|
def p_subproc_atom_envvar(self, p):
|
||||||
|
"""subproc_atom_envvar : dollar_name_tok equals_tok test"""
|
||||||
|
env = {p[1].value[1:]: p[3]}
|
||||||
|
print(env)
|
||||||
|
class O:
|
||||||
|
pass
|
||||||
|
o = O()
|
||||||
|
o.env = env
|
||||||
|
o._cliarg_action = "skip"
|
||||||
|
p[0] = o
|
||||||
|
|
||||||
def p_subproc_atom_uncaptured(self, p):
|
def p_subproc_atom_uncaptured(self, p):
|
||||||
"""subproc_atom : dollar_lbracket_tok subproc RBRACKET"""
|
"""subproc_atom : dollar_lbracket_tok subproc RBRACKET"""
|
||||||
p1 = p[1]
|
p1 = p[1]
|
||||||
|
|
Loading…
Add table
Reference in a new issue