aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/clog5
-rw-r--r--man/man1/clog.1df3
2 files changed, 7 insertions, 1 deletions
diff --git a/bin/clog b/bin/clog
index d52ab4c5..037f24c7 100755
--- a/bin/clog
+++ b/bin/clog
@@ -1,7 +1,10 @@
#!/bin/sh
# Record a timestamped message to a logfile, defaulting to ~/.clog
+self=clog
+command -v rlwrap >/dev/null 2>&1 &&
+ set -- rlwrap -C "$self" "$@"
{
date
- cat -
+ "$@" cat -
printf '%s\n' --
} >>"${CLOG:-"$HOME"/.clog}"
diff --git a/man/man1/clog.1df b/man/man1/clog.1df
index a0e6d117..0e3e7b87 100644
--- a/man/man1/clog.1df
+++ b/man/man1/clog.1df
@@ -13,5 +13,8 @@ getting real tired of all this overengineering
receives a message on stdin, timestamps it with a leading date(1), and writes
it to the file with path in environment variable CLOG, defaulting to ~/.clog,
terminating each entry with two hyphens.
+,P
+If rlwrap(1) is found, it will be used for the line editing. If not, just the
+terminal's cooked mode will be used.
.SH AUTHOR
Tom Ryder <tom@sanctum.geek.nz>