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:
Christopher Haster
2025-03-17 13:08:50 -05:00
parent 262ad7c08e
commit 460d8870ec
6 changed files with 8 additions and 6 deletions
+1 -1
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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(