aboutsummaryrefslogtreecommitdiffstats
path: root/bin/scotch
diff options
context:
space:
mode:
authorterminaldweller <thabogre@gmail.com>2023-01-14 04:30:53 +0000
committerterminaldweller <thabogre@gmail.com>2023-01-14 04:30:53 +0000
commitc81052b70888eb18dca82e33444ebbd9910f5ebc (patch)
tree6b6eb892438a15f7b4849d7508d61d9491b809c3 /bin/scotch
parentupdate (diff)
downloadscripts-c81052b70888eb18dca82e33444ebbd9910f5ebc.tar.gz
scripts-c81052b70888eb18dca82e33444ebbd9910f5ebc.zip
update
Diffstat (limited to '')
-rwxr-xr-xbin/scotch18
1 files changed, 10 insertions, 8 deletions
diff --git a/bin/scotch b/bin/scotch
index 9e885cb..638b101 100755
--- a/bin/scotch
+++ b/bin/scotch
@@ -535,16 +535,18 @@ def main():
lines = lines[:-2]
for line in lines:
# this is here to support the -i option
- if line[0] == "[":
+ if "-t" in sys.argv or "-tt" in sys.argv or "-ttt" in sys.argv:
+ timestamp_end_index = line.find(" ")
+ print(Color.six + line[: timestamp_end_index - 1], end=" ")
+ line = line[timestamp_end_index + 1 :]
+ if "-n" in sys.argv:
idx = line.find("]")
- if idx - 1 < 16:
- print(Color.twelve + line[0 : idx + 1], end=" ")
- line = line[idx + 2 :]
- if line[0] == "[":
+ print(Color.twelve + line[0 : idx + 1], end=" ")
+ line = line[idx + 2 :]
+ if "-i" in sys.argv:
idx = line.find("]")
- if idx - 1 == 16:
- print(Color.thirteen + line[0 : idx + 1], end=" ")
- line = line[idx + 2 :]
+ print(Color.thirteen + line[0 : idx + 1], end=" ")
+ line = line[idx + 2 :]
if line[0 : line.find("(")] in syscall_set:
syscall = line[0 : line.find("(")]
sysargs = line[line.find("(") + 1 : line.find(")")].split()