cmm: added options '--tight' and '--no-paging' to the 'hist --print' cmd
This commit was merged in pull request #16.
This commit is contained in:
@@ -256,13 +256,16 @@ class Chat:
|
||||
|
||||
def print(self, source_code_only: bool = False,
|
||||
with_metadata: bool = False,
|
||||
paged: bool = True) -> None:
|
||||
paged: bool = True,
|
||||
tight: bool = False) -> None:
|
||||
output: list[str] = []
|
||||
for message in self.messages:
|
||||
if source_code_only:
|
||||
output.append(message.to_str(source_code_only=True))
|
||||
continue
|
||||
output.append(message.to_str(with_metadata))
|
||||
if not tight:
|
||||
output.append('\n' + ('-' * terminal_width()) + '\n')
|
||||
if paged:
|
||||
print_paged('\n'.join(output))
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user