summary refs log tree commit diff stats
path: root/skullbashed
diff options
context:
space:
mode:
Diffstat (limited to 'skullbashed')
-rwxr-xr-xskullbashed17
1 files changed, 17 insertions, 0 deletions
diff --git a/skullbashed b/skullbashed
new file mode 100755
index 0000000..72bc92b
--- /dev/null
+++ b/skullbashed
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+# SkullbashEd - inspired by ed(1)
+if [ -z "$1" ]; then
+	echo 'A filename is required'
+	exit 1
+fi
+unset HISTFILE
+bash --init-file <(printf '%s\n' \
+	'source ~/.bashrc' \
+	'HISTFILESIZE=-1' \
+	'HISTCONTROL=ignorespace' \
+	;
+	printf 'HISTFILE=%q\n' "$1"
+	printf '%s\n' \
+	'history -c' \
+	;
+)