Commit cba3ebbe authored by Keegi's avatar Keegi

Fixed macro arguments expansion

parent 571e4402
...@@ -92,7 +92,7 @@ class pronsole(cmd.Cmd): ...@@ -92,7 +92,7 @@ class pronsole(cmd.Cmd):
if ls.startswith('!'): if ls.startswith('!'):
self.cur_macro += ws + ls[1:] + "\n" # python mode self.cur_macro += ws + ls[1:] + "\n" # python mode
else: else:
self.cur_macro += ws + 'self.onecmd("'+ls+'".format(arg))\n' # parametric command mode self.cur_macro += ws + 'self.onecmd("'+ls+'".format(*arg))\n' # parametric command mode
self.cur_macro_def += l + "\n" self.cur_macro_def += l + "\n"
def end_macro(self): def end_macro(self):
...@@ -137,7 +137,7 @@ class pronsole(cmd.Cmd): ...@@ -137,7 +137,7 @@ class pronsole(cmd.Cmd):
if macro_def.startswith("!"): if macro_def.startswith("!"):
self.cur_macro = "def macro(self,*arg):\n "+macro_def[1:]+"\n" self.cur_macro = "def macro(self,*arg):\n "+macro_def[1:]+"\n"
else: else:
self.cur_macro = "def macro(self,*arg):\n self.onecmd('"+macro_def+"'.format(arg))\n" self.cur_macro = "def macro(self,*arg):\n self.onecmd('"+macro_def+"'.format(*arg))\n"
self.end_macro() self.end_macro()
return return
if not self.processing_rc: if not self.processing_rc:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment