aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/clog5
1 files changed, 4 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}"