Mercurial > libervia-backend
diff sat_frontends/jp/base.py @ 3412:7b4ae3dbc041
jp (base, pubsub/set): new `--quiet` argument:
`--quiet` can be used to only return essential data from command. This is notably useful
to remove message and trailing line feed when returning a data which must be parsed by an
other program.
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 12 Nov 2020 14:53:16 +0100 |
parents | 4ca5bc6b44b6 |
children | be6d91572633 |
line wrap: on
line diff
--- a/sat_frontends/jp/base.py Thu Nov 12 14:53:16 2020 +0100 +++ b/sat_frontends/jp/base.py Thu Nov 12 14:53:16 2020 +0100 @@ -316,6 +316,11 @@ '--verbose', '-v', action='count', default=0, help=_("Add a verbosity level (can be used multiple times)")) + quiet_parent = self.parents['quiet'] = argparse.ArgumentParser(add_help=False) + quiet_parent.add_argument( + '--quiet', '-q', action='store_true', + help=_("be quiet (only output machine readable data)")) + draft_parent = self.parents['draft'] = argparse.ArgumentParser(add_help=False) draft_group = draft_parent.add_argument_group(_('draft handling')) draft_group.add_argument(