Update on_transform_command

This commit is contained in:
Jamie Bliss 2017-01-14 18:13:27 -05:00
parent 2acb4eb9be
commit fdb4a6ac35
3 changed files with 3 additions and 3 deletions

View file

@ -27,7 +27,7 @@ def test_pwd_tracks_cwd(xonsh_builtins, xonsh_execer, tmpdir_factory, monkeypatc
def test_transform(xonsh_builtins):
@xonsh_builtins.events.on_transform_command
def spam2egg(cmd):
def spam2egg(cmd, **_):
if cmd == 'spam':
return 'egg'
else:

View file

@ -50,7 +50,7 @@ def transform_command(src, show_diff=True):
raw = src
while src != lst:
lst = src
srcs = events.on_transform_command.fire(src)
srcs = events.on_transform_command.fire(cmd=src)
for s in srcs:
if s != lst:
src = s

View file

@ -2,7 +2,7 @@
@events.on_transform_command
def bash_preproc(cmd):
def bash_preproc(cmd, **kw):
if not __xonsh_history__.inps:
if cmd.strip() == '!!':
return ''