Subject: Re: Greetings and question about ~

From: David Dyck <[email-masked]>
Date: Wed, 25 Sep 1996 15:34:55 -0700

On Wed, 25 Sep 1996, Richard Pieri wrote:

> From: Richard Pieri <[email-masked]>
> Okay, just for the record, the tilde is *part* of a shortcut used by
> *some* Unix shells.  It does not exist on its own; it must be followed
> by either a slash or a user name.

I use ksh on Solaris, and it's man page reports

 "A ~ by itself, or in front of a /, is replaced by $HOME."

Bash also states the the user name may be omitted.
 "If this login name is the null string, the tilde  is
       replaced with the value of the parameter HOME"

While the csh manual does not state that the tilde
may stand alone, in operation, that is what it does.

Richard is right, that this is shell specific, and that not all
shells do it (sh doesn't)

 The function "Fexpand_file_name" in fileio.c
in the sources for emacs-19.30 that I have handy
has comments that where it can spot a /* ~ by itself */,
but then right near that comment is code
that states:
#ifdef DOS_NT
          /* Problem when expanding "~\" if HOME is not on current drive.
             Ulrich Leodolter, Wed Jan 11 10:20:35 1995 */
		.....
#endif

The emacs c source code looks for a drive letter in HOME environment variable