nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] folder -nocreate +/this/does/not/exist

2016-08-29 09:59:49
Ralph Corderoy <ralph(_at_)inputplus(_dot_)co(_dot_)uk> 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
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>