I first saw ~ as part of csh. Bill had an adm3a at home (which is why HJKL in vi) but there was a variety of terminals at Berkeley. I assumed ~ was Bill's idea.     Mary Ann On 11/18/20 2:25 PM, Clem Cole wrote: > A couple of my friends from UC Berkeley were musing on another email > thread.   The question from one of them came up: /"I'm teaching the > undergrad OS course this semester  ... Mention where ~ comes."/ > > This comment begets a discussion among the 4 of us at where it showed > up in the UNIX heritage and it if was taken from somewhere else. > > Using the tilde character as a short cut for $HOME was purely a > userspace convention and not part of the nami() kernel routine when it > came into being.  We know that it was supported by Mike Lesk in UUCP > and by Bill Joy in cshell.  The former was first widely released as > part of Seventh Edition but was working on V6 before that inside of > BTL.  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. > > In our exchange, someone observed suggested that Joy might have picked > it up because the HOME key was part of the tilde key on the ADM3A, > which were popular at UCB [/i.e./ the reason hjkl are the movement > keys on vi is the were embossed on the top of those keys on the > ADM3A].  It also was noted that the ASR-33 lacks a ~ key on its > keyboard.  But Lesk definitely needed something to represent a remote > user's home directory because each system was different, so he was > forced to use something. > > It was also noted that there was plenty of cross-pollination going on > as students and researchers moved from site to site, so it could have > been BTL to UCB, vice-versa, or some other path altogether. > > So two questions for this august body are: > > 1. Where did the ~ as $HOME convention come to UNIX? > 2. Did UNIX create the idiom, or was there an earlier system such as > CTSS, TENEX, ITS, MTS, TSS, or the like supported it? >