Merge branch 'master' of git.hjp.at:hjp/kitsune
This commit is contained in:
commit
93cf7b35b9
14
kitsune
14
kitsune
|
@ -94,7 +94,13 @@ def watch(args):
|
|||
if lines[-1] == "":
|
||||
lines.pop()
|
||||
for ln in lines:
|
||||
print(f"{f.path:{filename_length}}", format_ts(f.last_ts), dead, ln)
|
||||
s = ""
|
||||
if args.print_filename:
|
||||
s += f"{f.path:{filename_length}} "
|
||||
if args.print_timestamp:
|
||||
s += format_ts(f.last_ts) + " "
|
||||
s += dead + " " + ln
|
||||
print(s)
|
||||
else:
|
||||
try:
|
||||
stf = os.stat(f.path)
|
||||
|
@ -115,6 +121,12 @@ if __name__ == "__main__":
|
|||
ap.add_argument("--match-filename",
|
||||
help="follow only matching files in directories",
|
||||
metavar="GLOB-PATTERN")
|
||||
ap.add_argument("--no-filename", "--no-print-filename", action="store_false",
|
||||
dest="print_filename",
|
||||
help="don't print filename in each line")
|
||||
ap.add_argument("--no-timestamp", "--no-print-timestamp", action="store_false",
|
||||
dest="print_timestamp",
|
||||
help="don't print timestamp in each line")
|
||||
ap.add_argument("files", nargs="*", default=["."],
|
||||
metavar="file")
|
||||
args = ap.parse_args()
|
||||
|
|
Loading…
Reference in New Issue