[TUHS] Where did the "~" come from

Warner Losh imp at bsdimp.com
Fri Nov 20 01:50:28 AEST 2020


On Wed, Nov 18, 2020 at 3:27 PM Clem Cole <clemc at ccc.com> wrote:

> Joy's cshell came out as part of 2BSD (which was V7 based), but he had
> released "ashell" before that and included it in the original BSD (
> *a.k.a.* 1BSD) which was for V6 [what I don't remember is if it supported
> the convention and I can not easily un-ar(1) the cont.a files in the 1BSD
> tar image in Warren's archives.
>

Looking at the ashell sources on the 1BSD tuhs utree viewer suggests that ~
wasn't there yet, but that it was planned:

sh.c:
...

	Features remaining to be fixed up and/or implemented
	======== ========= == == ===== == === == ===========

...

 * Changes to glob to allow ~, prevent too long path, and prevent
 * perhaps running out of directories.

...

Looking at glob.c, there's no ~ nor 126/176/7e in the sources. Editing
the cont.a archive directly confirms no ~ or similar constant is
present.

By 2BSD, it was in sh.glob.c in the 'expand' function. Later versions
define TILDE as '~' and used that. V7 had no ~ in the shell, but as
you point out uucp there supported ~ for user home directories. V6
didn't have any of this included that I can find.


Warner
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20201119/d4667d2d/attachment.htm>


More information about the TUHS mailing list