diff options
Diffstat (limited to 'bin/edit.sh')
-rw-r--r-- | bin/edit.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/edit.sh b/bin/edit.sh new file mode 100644 index 00000000..c276707f --- /dev/null +++ b/bin/edit.sh @@ -0,0 +1,9 @@ +#!/bin/sh +set -eu + +script=$(mktemp) +trap "rm -f '$script'" EXIT + +sed "s/.*/${1:-: &}/" >> "$script" +$EDITOR "$script" +sh -eux "$script" |