This commit is contained in:
Ville Rantanen
2016-06-17 14:58:24 +03:00
parent 306b56f8dc
commit 4a83e624b2
2 changed files with 9 additions and 2 deletions

View File

@@ -45,6 +45,8 @@ Special syntaxes:
help="Disable color.")
parser.add_argument("-z",action="store_true",dest="zero",default=False,
help="Reset coloring at the end of each line.")
parser.add_argument("-Z",action="store_false",dest="zero_final",default=True,
help="Disable reset of colors at the end of file.")
parser.add_argument("filename",type=str,
help="File to show, - for stdin")
opts=parser.parse_args()
@@ -68,5 +70,6 @@ for row in f:
if opts.zero:
sys.stdout.write(bc.Z)
sys.stdout.write("\n")
if opts.zero_final:
sys.stdout.write(bc.Z.encode('utf-8'))