From: martin f. krafft Date: Fri, 18 Feb 2011 11:29:24 +0000 (+0100) Subject: add rlwrapping to scripts if installed X-Git-Url: https://git.madduck.net/etc/mutt.git/commitdiff_plain/9697fb1471e041b28c583426c7e113e2ea621fa9 add rlwrapping to scripts if installed --- diff --git a/.mutt/batch-subject-editor b/.mutt/batch-subject-editor index 8cfbf5d..e5bb596 100755 --- a/.mutt/batch-subject-editor +++ b/.mutt/batch-subject-editor @@ -9,6 +9,10 @@ # set -eu +if [ -z "${__RLWRAPPED:-}" ] && [ -x $(command -v rlwrap) ]; then + __RLWRAPPED=true exec rlwrap "$0" "$@" +fi + printf 'Enter new subject: ' >/dev/tty read subj /dev/tty read timespec