Subject: Re: ssh use of $HOME
To: None <current-users@netbsd.org>
From: Christos Zoulas <christos@astron.com>
List: current-users
Date: 02/01/2007 16:25:42
In article <6DB06CA9-B034-42A3-9AC6-EE1BA6C6B609@planix.com>,
Andreas Wrede <andreas@planix.com> wrote:
>-=-=-=-=-=-
>
>
>On Jan 31, 2007, at 15:17 , Christos Zoulas wrote:
>
>> What is the meaning of `~'? I presume that you would like `~' to
>> mean "the user's home directory as specified in /etc/passwd (pw_dir)".
>> Well, this is not exactly right. The `~' first got a special meaning
>> when it became part of the globbing special characters in csh(1)
>> meaning the current location of the home directory (from the value of
>> $HOME). So still today:
>>
>> % set home=/var/tmp # csh mirrors $home -> $HOME
>> % echo $HOME
>> /var/tmp
>> % cd ~
>> % pwd
>> /var/tmp
>>
>> So even if the patch is reversed, the manual page needs to be
>> corrected.
>
>Short of replacing all occurrences of ~/... with <home_dir> or
>something, maybe this will suffice:
>
>RCS file: /cvsroot/src/crypto/dist/ssh/ssh.1,v
>retrieving revision 1.35
>diff -u -r1.35 ssh.1
>--- ssh.1 28 Sep 2006 21:22:15 -0000 1.35
>+++ ssh.1 31 Jan 2007 23:22:47 -0000
>@@ -109,6 +109,9 @@
>is specified,
>it is executed on the remote host instead of a login shell.
>.Pp
>+Note that the tilde (~) character used in pathnames below is replaced
>+with the user's home directory, not the content of $HOME.
>+.Pp
>The options are as follows:
>.Bl -tag -width Ds
>.It Fl 1
Yes, I think that it will suffice too.
christos