Huhu Ralph, all.

Ralph Corderoy wrote in <20180902154326.ad17421...@orac.inputplus.co.uk>:
 |s-nail 14.9.11-1 on Arch Linux.
 |
 |On running this command, I type the four characters ‘bar\n’, and then
 |Ctrl-D, my TTY's EOF character, before the three seconds have elapsed.
 |It appears thus, with ‘␣’ being the cursor.
 |
 |    $ sleep 3; mail -s foo $LOGNAME
 |    bar
 |    ␣
 |
 |As mail runs, it changes to
 |
 |    $ sleep 3; mail -s foo $LOGNAME
 |    bar
 |    bar
 |    ^@␣

I presume you have no*ignoreeof* and no*asksend* set.
I wonder whether you would be helped with a shell alias that sets
*line-editor-disable* in addition, it would release the system
from quite some unnecessary burdens in this case.  And

  #?0[steffen@essex nail.git]$ sleep 6;\
    mail -:s -Snoasksend -Snoignoreeof -Sline-editor-disable -sx $USER
  foo
  ^@
  #?0...

works.

 |Despite my EOF, no shell prompt appears so I type another EOF.  And then
 |two more.  Only then does mail exit and my $PS1 appear.

Yes, in raw terminal mode VEOF has no meaning actually.

 |    $ sleep 3; mail -s foo $LOGNAME
 |    bar
 |    bar
 |    ^@$ 
 |
 |In total, one EOF before mail runs, three after.
 |
 |The email that arrives has the null byte suggested by the ‘^@’.

If you input a NUL byte we will not mangle you.  Good.

 |    $ sed -n \$p `mhpath .`
 |    YmFyCgA=
 |    $ sed -n \$p `mhpath .` | base64 -d | od -c
 |    0000000   b   a   r  \n  \0
 |    0000005
 |    $

Cryptic.  ..Or not.  But very distressing, puh!  Nothing for all
day use, maybe i should take Heirloom doctools instead of groff
and make it more user friendly until 2025.  That would make
friends, maybe.  (If i live long enough.)

 |Type-ahead in the TTY has long been a Unix advantage.  mail's notions of
 |line-editing is getting in the way.

So i have indeed implemented a special NUL->EOT/VEOF redirect for
interactive mode, because i think the idea is neat.  It is on
[master].  (Note that unless flaws are detected which require so,
it can even become December until we see another release, i do not
know yet.)

Sorry for the late reply by the way, Olav Mørkrid suggested a very
good idea regarding *expandaddr* (one of multiple actually), and
that one is so tough that even my old C++ would not have done it,
so i have implemented "cache only" lookups for my old DNS parser
today while offline.  (Entries from /etc/hosts are prefilled into
the cache, so it would be sufficient to consider "local receivers"
from "external receivers" like that, what the suggestion was.)

Also, you are silent on an endless amount of job control related
bugs in a countless number of Unix utilities.  Daily i find myself
in odds with less(1) on bash(1) or mksh(1) because something eats
the terminal settings very frequently, so that ^Z prints as such,
and line editing is off.  Only another return helps out.
Glad mail is great again.  So to say.

Ciao Ralph!

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)

Reply via email to