|
[Rivet-svn] rivet: Pass -X flag to less pagerRivet Mercurial rivet at projects.hepforge.orgThu Mar 3 13:15:01 GMT 2016
details: https://rivet.hepforge.org/hg/rivet/rev/b4e9d75942ca branches: release-2-4-x changeset: 5009:b4e9d75942ca user: Andy Buckley <andy at insectnation.org> date: Thu Mar 03 13:01:13 2016 +0000 description: Pass -X flag to less pager diffs (28 lines): --- a/bin/rivet Wed Mar 02 17:01:09 2016 +0000 +++ b/bin/rivet Thu Mar 03 13:01:13 2016 +0000 @@ -243,7 +243,7 @@ print msg #os.write(tf, msg + "\n") # if os.path.getsize(tfpath) > 0: - # pager = subprocess.Popen(["less", "-F", tfpath]) #, stdin=subprocess.PIPE) + # pager = subprocess.Popen(["less", "-FX", tfpath]) #, stdin=subprocess.PIPE) # pager.communicate() finally: # os.unlink(tfpath) #< always clean up @@ -353,6 +353,7 @@ ## Add to the output msgs.append(msg) + ## Write the combined messages to a temporary file and page it if msgs: try: @@ -360,7 +361,7 @@ tffd, tfpath = tempfile.mkstemp(prefix="rivet-show.") os.write(tffd, "\n\n".join(msgs)) if sys.stdout.isatty(): - pager = subprocess.Popen(["less", "-F", tfpath]) #, stdin=subprocess.PIPE) + pager = subprocess.Popen(["less", "-FX", tfpath]) #, stdin=subprocess.PIPE) pager.communicate() else: f = open(tfpath)
More information about the Rivet-svn mailing list |