Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Jun 2016 11:03:30 +0800
From:      Erich Dollansky <erichsfreebsdlist@alogt.com>
To:        Polytropon <freebsd@edvax.de>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: HOME, Home and home in tcsh
Message-ID:  <20160609110330.540d0ad5@X220.alogt.com>
In-Reply-To: <20160609045645.f98518c7.freebsd@edvax.de>
References:  <20160609102944.39f0e4c2@X220.alogt.com> <20160609045645.f98518c7.freebsd@edvax.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

On Thu, 9 Jun 2016 04:56:45 +0200
Polytropon <freebsd@edvax.de> wrote:

> On Thu, 9 Jun 2016 10:29:44 +0800, Erich Dollansky wrote:

> > the answer to my question might be so obvious, but I do not know it.
> > 
> > I use this to set the home for the current project I am working on
> > and then use cd $Home to return to the project's home directory:
> > 
> > setenv home "`pwd`/" 
> > setenv Home "`pwd`/"
> > 
> > 'home' contains always my real home directory. 'Home' contains the
> > project's home directory as expected.
> > 
> > Does anybody know why it is like this?  
> 
> The variable $home is set by the C shell automatically, similarly
> as it does "set path = (... list of path elements ...)"; $home is
> set like $HOME by the shell itself and should not be altered by
> the user (without purpose). :-)
> 
> From "man csh":
> 
>        The character `~' at the beginning of a filename refers to
> home  direc- tories.   Standing  alone,  i.e., `~', it expands to the
> invoker's home directory as reflected in the value of the home shell
> variable.
> 
> [...]
> 
>    Special shell variables

I obviously missed it here.

>        HOME    Equivalent to the home shell variable.
> 
Now I know that it does fall down from the blue sky.

Thanks!

Erich



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160609110330.540d0ad5>