changeset 2214:4e06cd44e667

jp (pubsub/get): --service is now optional argument, and sub_id now use "-S" short option
author Goffi <goffi@goffi.org>
date Wed, 29 Mar 2017 19:42:44 +0200
parents 1010054cf771
children 5831e8fcc5f8
files frontends/src/jp/cmd_pubsub.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/frontends/src/jp/cmd_pubsub.py	Wed Mar 29 19:42:44 2017 +0200
+++ b/frontends/src/jp/cmd_pubsub.py	Wed Mar 29 19:42:44 2017 +0200
@@ -195,13 +195,13 @@
     def add_parser_options(self):
         self.parser.add_argument("-i", "--item", type=base.unicode_decoder, action='append', default=[], dest='items',
                                  help=_(u"item(s) id(s) to get (default: request all items)"))
-        self.parser.add_argument("-s", "--sub-id", type=base.unicode_decoder, default=u'',
+        self.parser.add_argument("-S", "--sub-id", type=base.unicode_decoder, default=u'',
                                  help=_(u"subscription id"))
         self.parser.add_argument("-m", "--max", type=int, default=10, help=_(u"maximum number of items to get ({} to get all items)".format(C.NO_LIMIT)))
         # TODO: a key(s) argument to select keys to display
+        self.parser.add_argument("-s", "--service", type=base.unicode_decoder, default=u'',
+                                 help=_(u"JID of the PubSub service (default: request profile own pubsub)"))
         self.parser.add_argument("node", type=base.unicode_decoder, help=_(u"node to request"))
-        self.parser.add_argument("service", type=base.unicode_decoder, nargs='?', default=u'',
-                                 help=_(u"JID of the PubSub service (default: request profile own pubsub)"))
         # TODO: add MAM filters