diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-09-24 20:08:04 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-24 20:08:04 -0400 |
commit | a75e42a7928f74d8570bf4eec52435d556a83946 (patch) | |
tree | 6fab96cc19137ccdd75b9bd1eb861d45bd60553f /cmd2/cmd2.py | |
parent | a2ad70bd79a78123d2bb67b1ff1ed0b815dd721d (diff) | |
parent | c8890646d88fab3e07ccd71b30c2fed3785a7d5e (diff) | |
download | cmd2-git-a75e42a7928f74d8570bf4eec52435d556a83946.tar.gz |
Merge branch 'master' into colorize
Diffstat (limited to 'cmd2/cmd2.py')
-rw-r--r-- | cmd2/cmd2.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py index 37033ba4..0dd93662 100644 --- a/cmd2/cmd2.py +++ b/cmd2/cmd2.py @@ -2481,13 +2481,17 @@ Usage: Usage: unalias [-a] name [name ...] doc_block = [] found_first = False for doc_line in doc.splitlines(): - str(doc_line).strip() - if len(doc_line.strip()) > 0: - doc_block.append(doc_line.strip()) - found_first = True - else: + stripped_line = doc_line.strip() + + # Don't include :param type lines + if stripped_line.startswith(':'): if found_first: break + elif stripped_line: + doc_block.append(stripped_line) + found_first = True + elif found_first: + break for doc_line in doc_block: self.stdout.write('{: <{col_width}}{doc}\n'.format(command, |