From owner-freebsd-questions@freebsd.org Thu Jun 9 15:49:24 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7F94AEFEBF for ; Thu, 9 Jun 2016 15:49:24 +0000 (UTC) (envelope-from jd1008@gmail.com) Received: from mail-qg0-x22e.google.com (mail-qg0-x22e.google.com [IPv6:2607:f8b0:400d:c04::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 822361039 for ; Thu, 9 Jun 2016 15:49:24 +0000 (UTC) (envelope-from jd1008@gmail.com) Received: by mail-qg0-x22e.google.com with SMTP id q32so22436174qgq.3 for ; Thu, 09 Jun 2016 08:49:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-transfer-encoding; bh=SD+EMS0DKPPbY8Z6yH9LnyhMhaG0RQ6PRKCeYHd77BE=; b=0cxl0FqPrhAirXZX3RSEjW/d6ywdZKdXNlLHHBfl3V9cH0s7wYUdfxbYSZh/2Eup4Z 9FTmnBBKs/lglIcr8wfQLnPlG1f70hx+QEZVVBt5CPrlQGHqU4ZDcvEIJMnmWIWYtpA5 X0CACuadfbvUIqeScvuSx21LBD9g+7ezt7cBNIX6zJ6pz8NeUvY1KCVldarhuqaRdT23 54s9HGc13J9HjQVoMcHlAkEYc5Wi3+GhVPXx1LLk/Rkao/sGuXjnzwurzlT2QmawSCCh Dut5kBwGCJKbQIphTQfOj0iEqVh+kWN7Vi6kn9e156qMoRoQ1ZYZSbNvFjOHC/UkMGVL fayw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-transfer-encoding; bh=SD+EMS0DKPPbY8Z6yH9LnyhMhaG0RQ6PRKCeYHd77BE=; b=UBwp1mON/KhbuSs+4bUiowu8oeqoeKboVcOG51i+2tpDtm939ABqX3fdlPcIP5ruhp CcSnr+zIaFpvNQkETfRHY/vbG8Znhx2cVRLFtx6DQZM/MLMG3pBKt608laOh4Yu0V5tk b+noIAh5vmAl01j3ONAIEc8sgwsYQkZua5uol0qNMxa4t9dlzuJTYAmtQQlF06jgJY6H NZphT2TAyTTn7icIyY5mDodVxZlHrXkileVyDF9hVTjuKm1aL14LoL2N68/aoB003rW4 v/pq6S8ZON1v1onOoSY4jHfb0pq3TgF8CdrxKszF7/4pMOQ83MMyU17vW07zz4OeX12g GY9g== X-Gm-Message-State: ALyK8tIZc/mP+hEuN1quWZQTcLFqdKyk/27PGyFZUHp7w2r+kCj0wXXQLdSbv6BZcmTctg== X-Received: by 10.140.40.239 with SMTP id x102mr1971357qgx.93.1465487363575; Thu, 09 Jun 2016 08:49:23 -0700 (PDT) Received: from localhost.localdomain ([50.243.4.3]) by smtp.googlemail.com with ESMTPSA id z94sm688671qtc.49.2016.06.09.08.49.22 for (version=TLSv1/SSLv3 cipher=OTHER); Thu, 09 Jun 2016 08:49:22 -0700 (PDT) Message-ID: <57598FFD.9020004@gmail.com> Date: Thu, 09 Jun 2016 09:49:17 -0600 From: jd1008 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: freebsd-questions@freebsd.org Subject: Re: HOME, Home and home in tcsh References: <20160609102944.39f0e4c2@X220.alogt.com> <20160609045645.f98518c7.freebsd@edvax.de> In-Reply-To: <20160609045645.f98518c7.freebsd@edvax.de> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jun 2016 15:49:24 -0000 On 06/08/2016 08:56 PM, Polytropon wrote: > On Thu, 9 Jun 2016 10:29:44 +0800, Erich Dollansky wrote: >> Hi, >> >> 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 > The variables described in this section have special meaning to the > shell. > > The shell sets addsuffix, argv, autologout, csubstnonl, command, > echo_style, edit, gid, group, home, loginsh, oid, path, prompt, > prompt2, prompt3, shell, shlvl, tcsh, term, tty, uid, user and version > at startup; they do not change thereafter unless changed by the user. > The shell updates cwd, dirstack, owd and status when necessary, and > sets logout on logout. > > The shell synchronizes group, home, path, shlvl, term and user with the > environment variables of the same names: whenever the environment vari- > able changes the shell changes the corresponding shell variable to > match (unless the shell variable is read-only) and vice versa. Note > that although cwd and PWD have identical meanings, they are not syn- > chronized in this manner, and that the shell automatically intercon- > verts the different formats of path and PATH. > > [...] > > home Initialized to the home directory of the invoker. The filename > expansion of `~' refers to this variable. > > [...] > > HOME Equivalent to the home shell variable. > > > > +1 Shell make no use of $Home.