Am 17.10.21 um 22:04 schrieb Oskari Pirhonen:
> On Sun, Oct 17, 2021 at 08:31:41PM +0100, Claus Assmann wrote:
>> Why don't you use a wrapper which invokes
>> clear
>> after mutt finished? No extra code needed in mutt.
> Wow, I can't believe I didn't think of that *facepalms*.
>
> Thanks for the tip. It was much faster to write than adding the config
> option. Here's the script I used in case anyone else sees this and wants
> to do the same:
>
> ```
> #! /bin/bash
>
> eval $(which mutt) "$@" && clear
> ```

Oskari,

Speaking of simplifications:

1. Is the "clear only if mutt exits with status 0" intentional? If not,
";" would be preferable to "&&".

2. Why do you 'eval $(which mutt)' rather than just running plain 'mutt'?
which(1) isn't portable, it's not a POSIX utility nor a POSIX sh built-in,
and its output may consequently be unsuitable for shell evaluation.

Reply via email to