From 9697fb1471e041b28c583426c7e113e2ea621fa9 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Fri, 18 Feb 2011 12:29:24 +0100 Subject: [PATCH 1/1] add rlwrapping to scripts if installed --- .mutt/batch-subject-editor | 4 ++++ .mutt/edit-header | 4 ++++ .mutt/get-timestamp | 4 ++++ 3 files changed, 12 insertions(+) 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