I think I saw this in _The Unix Programming Environment_ by Kernighan and Pike. @ doesn't seem to do anything using various shells on any systems I can quickly think of trying:
* /bin/sh (dash) on Linux on AMD64
* zsh on Linux on AMD64, NetBSD/amd64 (Xen domU), NetBSD/sparc64, Solaris 10 on Sparc64
* bash on Linux on AMD64
* /bin/sh on NetBSD/amd64 (Xen domU), NetBSD/sparc64, Solaris 10 on Sparc64, Tru64 V5.1 2650 on Alpha
* pdksh on OpenBSD on AMD64
None of those seemed to treat @ as anything special so I decided to go older, but…
* /bin/csh and /bin/sh on 4.3BSD on simh-vax780
…equally bust. Maybe I'm remembering the syntax wrong? I don't have the book with me now. Otherwise, wonder when this feature was removed? Probably after video terminals with erasable characters became commonplace.
> During input, erase and kill processing is normally done. The ERASE character (by default, the # character) erases the last character typed. The WERASE character (CRTL-W) erases the last ‘‘word’’ typed in the current input line (but not any preceding spaces or tabs). A ‘‘word’’ is defined as a sequence of non-blank characters, with tabs counted as blanks. Neither ERASE nor WERASE will erase beyond the beginning of the line. The KILL character (by default, the @ character) kills (deletes) the entire input line, and optionally outputs a newline character. All these characters operate on a key stroke basis, independent of any backspacing or tabbing that may have been done. The REPRINT character (CTRL-R) prints a newline followed by all characters that have not been read. Reprinting also occurs automatically if characters that would normally be erased from the screen are fouled by program output. The characters are reprinted as if they were being echoed; consequencely, if ECHO is not set, they are not printed.
I think the erasing behavior came from 2BSD. That's where I saw it first in Unix.
I suspect the default got changed round about the time '@' became used in email addresses.
If you're writing a quick script it's way more convenient and readable to just put the input where you'd expect it, at the start of the pipeline, as its own thing. It's a bit more inefficient, but you don't go mucking around with file input parameters for the commands later on in the pipeline, especially as you're moving them around and changing them.
`&` is my next thing to implement.
It has the old line discipline defaults for the eof, kill, and interrupt special characters. But it also has a job control shell and the susp special character. It does not mention either Mail or mailx. login is apparently the shell built in that overlays the current shell, and there are both vi and ex for the visual and line mode editors. But there's a help command, too.
Someone in a sibling thread mentioned the kill line characters were already replaced around 2BSD. SVR1 had vi and ex, too. `lpr` is BSDian, I think, but maybe System V included that too as an alternative.
It's hard to tell, really. At the time SVR1 was out and included fairly many bits of BSD in it, as did Xenix. The only thing I can really say is that SunOS is unlikely, since it was designed for workstations with video monitors from day 1 and the kill characters seem anachronistic since erasing was a standard feature in terminals already and default behavior in current BSD.
MANPAGER=mupdf man -T pdf man
Better yet, the `-T` switch seems to take a decent selection of options, even markdown and html!