diff options
author | Lars Wirzenius <liw@liw.fi> | 2015-10-18 20:08:57 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2015-10-18 20:08:57 +0300 |
commit | aed6b440f2bf58186636c8c5e47dc8f9ca5133ba (patch) | |
tree | ebff71687910bad67224ff7db9de1dc545b2386b /ick | |
parent | 4d1dfd4bfb68609ac9b46ec7146309608f54f1b6 (diff) | |
download | ick-aed6b440f2bf58186636c8c5e47dc8f9ca5133ba.tar.gz |
Fix number of output lines
Diffstat (limited to 'ick')
-rwxr-xr-x | ick | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -63,7 +63,9 @@ class Ick(cliapp.Application): def create_ttystatus(self): ts = ttystatus.TerminalStatus(period=0) - if not self.settings['quiet']: + if self.settings['quiet']: + ts.max_output_lines = 0 + else: width, height = ts.get_terminal_size() format_lines = [ '%ElapsedTime() ' @@ -74,10 +76,10 @@ class Ick(cliapp.Application): 'Command: %String(command)', 'Output: %String(line0)', ] - while len(format_lines) < height - 1: - format_lines.append(' : ') + ts.max_output_lines = height - len(format_lines) + for i in range(1, ts.max_output_lines): + format_lines.append(' : %%String(line%d)' % i) ts.format('\n'.join(format_lines)) - ts.max_output_lines = 8 return ts def build_projects(self, ick): |