summaryrefslogtreecommitdiff
path: root/bin/clhs
diff options
context:
space:
mode:
authorWarrick Lo <warrick.s.z.lo@gmail.com>2021-12-03 05:50:44 -0800
committerWarrick Lo <warrick.s.z.lo@gmail.com>2021-12-03 05:50:44 -0800
commit47ea7f888cb0117635d69ba6d36464714801c9af (patch)
treee7f7114151165224f524479fb71c2dc367802cd2 /bin/clhs
parent6fa236111927666155093e4fe915897a89e3cfd7 (diff)
Add shell scripts
Diffstat (limited to 'bin/clhs')
-rwxr-xr-xbin/clhs11
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/clhs b/bin/clhs
new file mode 100755
index 0000000..8c6da89
--- /dev/null
+++ b/bin/clhs
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+# Clear shell history.
+
+if [ -f "$HISTFILE" ]; then
+ : > "$HISTFILE"
+fi
+
+# Script must be sourced for this to work.
+history -c > /dev/null 2>&1
+history -p > /dev/null 2>&1