diff options
-rwxr-xr-x | bin/clog | 5 | ||||
-rw-r--r-- | man/man1/clog.1df | 3 |
2 files changed, 7 insertions, 1 deletions
@@ -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> |