summary refs log tree commit diff stats
path: root/skullbashed
blob: 72bc92bd401e0f7329d6ad010dad9fbaf589de90 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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' \
	;
)