Mercurial > libervia-backend
comparison frontends/src/jp/cmd_shell.py @ 2310:5996063ecad7
jp (shell): don't print header if a command is specified in help
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 06 Jul 2017 20:31:31 +0200 |
parents | c7a72b75232b |
children | a42a2478abd2 |
comparison
equal
deleted
inserted
replaced
2309:c7a72b75232b | 2310:5996063ecad7 |
---|---|
139 """ | 139 """ |
140 self.do_do(args) | 140 self.do_do(args) |
141 | 141 |
142 def do_help(self, args): | 142 def do_help(self, args): |
143 """show help message""" | 143 """show help message""" |
144 self.disp(A.color(C.A_HEADER, _(u'Shell commands:')), no_lf=True) | 144 if not args: |
145 self.disp(A.color(C.A_HEADER, _(u'Shell commands:')), no_lf=True) | |
145 super(Shell, self).do_help(args) | 146 super(Shell, self).do_help(args) |
146 if not args: | 147 if not args: |
147 self.disp(A.color(C.A_HEADER, _(u'Action commands:'))) | 148 self.disp(A.color(C.A_HEADER, _(u'Action commands:'))) |
148 help_list = self._cur_parser.format_help().split('\n\n') | 149 help_list = self._cur_parser.format_help().split('\n\n') |
149 print('\n\n'.join(help_list[1 if self.path else 2:])) | 150 print('\n\n'.join(help_list[1 if self.path else 2:])) |