From f526f72bf8ca0c61eb279e6ff86915c965ff7c31 Mon Sep 17 00:00:00 2001 From: nojhan Date: Fri, 30 Mar 2012 23:28:42 +0200 Subject: [PATCH] colorout: bugfix arguments number, more examples --- src/colorout.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/colorout.py b/src/colorout.py index 1c45c9e..61e9428 100755 --- a/src/colorout.py +++ b/src/colorout.py @@ -8,6 +8,7 @@ # colorout /home/[a-z]+ magenta < /etc/passwd # ls -l | colorout .\(r.-\){3} yellow standard # make 2>&1 | colorout [0-9]+ green | colorout error +# make 2>&1 | colorout [0-9]+ yellow standard | colorout error | colorout warning magenta | colorout \(note\)\|\(#pragma\\s+\) green standard ############################################################################################ import re @@ -64,7 +65,7 @@ if __name__ == "__main__": nargs = len(sys.argv) - if nargs <= 1 or nargs >= 4: + if nargs <= 1 or nargs >= 5: msg = "Usage: colorout pattern [color] [style]" msg += "\n\tAvailable colors: "+" ".join(colors) msg += "\n\tAvailable styles: "+" ".join(styles)