From 7a1d7ecaf4a25d1fd56447ed0a9f5fab89fc26af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kim=20Silkeb=C3=A6kken?= Date: Mon, 28 Jan 2013 07:40:42 +0100 Subject: [PATCH] Add width argument to shell script --- scripts/powerline | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/powerline b/scripts/powerline index 01cc2dc8..2fc4c956 100755 --- a/scripts/powerline +++ b/scripts/powerline @@ -15,13 +15,14 @@ parser = argparse.ArgumentParser(description=__doc__) parser.add_argument('ext', nargs=1) parser.add_argument('side', nargs='?', choices=('left', 'right')) parser.add_argument('-r', '--renderer_module', choices=('shell', 'zsh_prompt', 'tmux')) -parser.add_argument('--last_exit_code', type=int, metavar='int') -parser.add_argument('--last_pipe_status', metavar='list') +parser.add_argument('-w', '--width', type=int) +parser.add_argument('--last_exit_code', type=int, metavar='INT') +parser.add_argument('--last_pipe_status', metavar='LIST') if __name__ == '__main__': args = parser.parse_args() powerline = Powerline(ext=args.ext[0], renderer_module=args.renderer_module, segment_info=args) - rendered = powerline.renderer.render(side=args.side) + rendered = powerline.renderer.render(width=args.width, side=args.side) try: sys.stdout.write(rendered) except UnicodeEncodeError: