diff options
author | SoniEx2 <endermoneymod@gmail.com> | 2024-07-30 22:40:38 -0300 |
---|---|---|
committer | SoniEx2 <endermoneymod@gmail.com> | 2024-07-30 22:40:38 -0300 |
commit | 9e0019a30f6c132c0b30c5f2ff6cf3c290dc4a12 (patch) | |
tree | e3e2eb72f4b24ac3814976872bb61736971c445d /skullbashed |
Initial commit default
Diffstat (limited to 'skullbashed')
-rwxr-xr-x | skullbashed | 17 |
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' \ + ; +) |