scripts: Adopted -c for --cat shortform
This avoids conflicts with -z/--depth, which will likely be an issue for dbgbmap.py.
This commit is contained in:
+1
-1
@@ -1523,7 +1523,7 @@ if __name__ == "__main__":
|
|||||||
action='store_true',
|
action='store_true',
|
||||||
help="Show the first n lines.")
|
help="Show the first n lines.")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'-z', '--cat',
|
'-c', '--cat',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
help="Pipe directly to stdout.")
|
help="Pipe directly to stdout.")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
|
|||||||
+2
-1
@@ -143,6 +143,7 @@ def openio(path, mode='r', buffering=-1):
|
|||||||
else:
|
else:
|
||||||
return open(path, mode, buffering)
|
return open(path, mode, buffering)
|
||||||
|
|
||||||
|
# keep-open stuff
|
||||||
if inotify_simple is None:
|
if inotify_simple is None:
|
||||||
Inotify = None
|
Inotify = None
|
||||||
else:
|
else:
|
||||||
@@ -2006,7 +2007,7 @@ if __name__ == "__main__":
|
|||||||
action='store_true',
|
action='store_true',
|
||||||
help="Show the first n lines.")
|
help="Show the first n lines.")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'-z', '--cat',
|
'-c', '--cat',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
help="Pipe directly to stdout.")
|
help="Pipe directly to stdout.")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
|
|||||||
+1
-1
@@ -178,7 +178,7 @@ if __name__ == "__main__":
|
|||||||
help="Show this many lines of history. 0 uses the terminal "
|
help="Show this many lines of history. 0 uses the terminal "
|
||||||
"height. Defaults to 5.")
|
"height. Defaults to 5.")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'-z', '--cat',
|
'-c', '--cat',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
help="Pipe directly to stdout.")
|
help="Pipe directly to stdout.")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
|
|||||||
+1
-1
@@ -1200,7 +1200,7 @@ if __name__ == "__main__":
|
|||||||
action='store_true',
|
action='store_true',
|
||||||
help="Show the first n lines.")
|
help="Show the first n lines.")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'-z', '--cat',
|
'-c', '--cat',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
help="Pipe directly to stdout.")
|
help="Pipe directly to stdout.")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
|
|||||||
+2
-1
@@ -53,6 +53,7 @@ def openio(path, mode='r', buffering=-1):
|
|||||||
else:
|
else:
|
||||||
return open(path, mode, buffering)
|
return open(path, mode, buffering)
|
||||||
|
|
||||||
|
# keep-open stuff
|
||||||
if inotify_simple is None:
|
if inotify_simple is None:
|
||||||
Inotify = None
|
Inotify = None
|
||||||
else:
|
else:
|
||||||
@@ -1374,7 +1375,7 @@ if __name__ == "__main__":
|
|||||||
action='store_true',
|
action='store_true',
|
||||||
help="Show the first n lines.")
|
help="Show the first n lines.")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'-z', '--cat',
|
'-c', '--cat',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
help="Pipe directly to stdout.")
|
help="Pipe directly to stdout.")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
|
|||||||
+1
-1
@@ -285,7 +285,7 @@ if __name__ == "__main__":
|
|||||||
action='store_true',
|
action='store_true',
|
||||||
help="Show the first n lines.")
|
help="Show the first n lines.")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'-z', '--cat',
|
'-c', '--cat',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
help="Pipe directly to stdout.")
|
help="Pipe directly to stdout.")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
|
|||||||
Reference in New Issue
Block a user