changeset 2411:f9167c053475

jp (ad-hoc/run): node is now a positional argument
author Goffi <goffi@goffi.org>
date Tue, 31 Oct 2017 23:30:18 +0100
parents 40e6e779a253
children 7641bef56dcd
files frontends/src/jp/cmd_adhoc.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/frontends/src/jp/cmd_adhoc.py	Tue Oct 31 23:29:45 2017 +0100
+++ b/frontends/src/jp/cmd_adhoc.py	Tue Oct 31 23:30:18 2017 +0100
@@ -72,7 +72,6 @@
         self.need_loop=True
 
     def add_parser_options(self):
-        self.parser.add_argument('-n', '--node', type=base.unicode_decoder, default=u'', help=_(u"node of the command (default: list commands)"))
         self.parser.add_argument('-j', '--jid', type=base.unicode_decoder, default=u'', help=_(u"jid of the service (default: profile's server"))
         self.parser.add_argument("-S", "--submit", action='append_const', const=xmlui_manager.SUBMIT, dest='workflow', help=_(u"submit form/page"))
         self.parser.add_argument("-f",
@@ -83,6 +82,7 @@
             dest='workflow',
             metavar=(u"KEY", u"VALUE"),
             help=_(u"field value"))
+        self.parser.add_argument('node', type=base.unicode_decoder, nargs='?', default=u'', help=_(u"node of the command (default: list commands)"))
 
     def adHocRunCb(self, xmlui_raw):
         xmlui = xmlui_manager.create(self.host, xmlui_raw)