bugfixes
This commit is contained in:
@@ -32,6 +32,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()
|
||||
@@ -164,6 +166,7 @@ inlines=['bold1','bold2','code_special','code','image','link','underline','strik
|
||||
|
||||
if __name__ == "__main__":
|
||||
opts=setup_options()
|
||||
bc=ansi.code()
|
||||
if opts.filename=="-":
|
||||
f=sys.stdin
|
||||
else:
|
||||
@@ -183,5 +186,6 @@ if __name__ == "__main__":
|
||||
if opts.zero:
|
||||
sys.stdout.write(bc.Z)
|
||||
sys.stdout.write("\n")
|
||||
|
||||
if opts.zero_final:
|
||||
sys.stdout.write(bc.Z.encode('utf-8'))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user