Ralph Corderoy <[email protected]> writes:
>Hi Norm,
>
>> I customarily begin all my bash scripts with
>>
>>   set -eu
>
>Yes, I do something similar, but it was interactive use where I didn't
>notice folder had failed.
>
>>   command || true

I get around that by a pretty idiosyncratic trick, that many people would
find intolerable. I have

PROMPT_COMMAND='[ $? -eq 0 ] || play 
/usr/local/lib/sounds/swish.au;youHaveMail;directory'

Where youHaveMail produces a voice sound when I have mail and it has been a 
while
since that sound was last enunciated, and where directory sets the bash prompt
as a function of the host and the current directory.

Confession: I have never fixed this problem:

     false|true

Then true is run and the command does not return an error value.

    Norman Shapiro

_______________________________________________
Nmh-workers mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/nmh-workers

Reply via email to