diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-05-02 00:26:25 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-05-02 00:26:25 +1200 |
commit | b7e47b0941ebd056f75bbf2d4a2e09a672b24170 (patch) | |
tree | 9f953f242748b207e518338a179caf928c517e39 /bin/clog.sh | |
parent | Fix a misplaced line (diff) | |
download | dotfiles-b7e47b0941ebd056f75bbf2d4a2e09a672b24170.tar.gz dotfiles-b7e47b0941ebd056f75bbf2d4a2e09a672b24170.zip |
Clean up clog(1df) a bit
Diffstat (limited to 'bin/clog.sh')
-rwxr-xr-x[-rw-r--r--] | bin/clog.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/clog.sh b/bin/clog.sh index 0964ce90..b17ff1c5 100644..100755 --- a/bin/clog.sh +++ b/bin/clog.sh @@ -1,7 +1,16 @@ +#!/bin/sh # Record a timestamped message to a logfile, defaulting to ~/.clog self=clog + +# Ignore arguments +set -- + +# If we have rlwrap, quietly use it command -v rlwrap >/dev/null 2>&1 && set -- rlwrap -C "$self" "$@" + +# Write the date, the standard input (rlwrapped if applicable), and two dashes +# to $CLOG, defaulting to ~/.clog. { date "$@" cat - |