mirror of
https://github.com/ejwa/gitinspector.git
synced 2024-11-14 07:41:07 +01:00
Completely removed the -x option controlling printing of escape characters.
Instead, gitinspector now probes stdout and checks if it points to a proper terminal. If it doesn't, escape characters are skipped.
This commit is contained in:
parent
4c52b1b5e9
commit
2d3e8e673c
2 changed files with 2 additions and 6 deletions
|
@ -33,13 +33,12 @@ class Runner:
|
|||
self.hard = False
|
||||
self.list_file_types = False
|
||||
self.repo = "."
|
||||
self.skipescapes = False
|
||||
self.tda367 = False
|
||||
self.timeline = False
|
||||
self.useweeks = False
|
||||
|
||||
def output(self):
|
||||
terminal.skip_escapes(self.skipescapes)
|
||||
terminal.skip_escapes(not sys.stdout.isatty())
|
||||
changes.output(self.repo, self.hard)
|
||||
|
||||
if changes.get(self.repo, self.hard).get_commits():
|
||||
|
@ -59,7 +58,7 @@ if __name__ == "__main__":
|
|||
__run__ = Runner()
|
||||
|
||||
try:
|
||||
__opts__, __args__ = getopt.gnu_getopt(sys.argv[1:], "f:hHlTwx", ["file-types=", "hard", "help",
|
||||
__opts__, __args__ = getopt.gnu_getopt(sys.argv[1:], "f:hHlTw", ["file-types=", "hard", "help",
|
||||
"list-file-types", "tda367", "timeline", "version"])
|
||||
except getopt.error, msg:
|
||||
print sys.argv[0], "\b:", msg
|
||||
|
@ -87,8 +86,6 @@ if __name__ == "__main__":
|
|||
__run__.timeline = True
|
||||
elif o in("-w"):
|
||||
__run__.useweeks = True
|
||||
elif o in("-x"):
|
||||
__run__.skipescapes = True
|
||||
for arg in __args__:
|
||||
__run__.repo = arg
|
||||
|
||||
|
|
1
help.py
1
help.py
|
@ -38,7 +38,6 @@ Mandatory arguments to long options are mandatory for short options too.
|
|||
for things such as documentation (RAD/SDD)
|
||||
-w show all statistical information in weeks
|
||||
instead of in months
|
||||
-x skip printing of escape characters
|
||||
-h, --help display this help and exit
|
||||
--version output version information and exit
|
||||
|
||||
|
|
Loading…
Reference in a new issue