From owner-svn-src-all@freebsd.org Wed Jan 9 17:05:23 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 64B701487601; Wed, 9 Jan 2019 17:05:23 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-oi1-f170.google.com (mail-oi1-f170.google.com [209.85.167.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F09086A856; Wed, 9 Jan 2019 17:05:22 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-oi1-f170.google.com with SMTP id y1so6851717oie.12; Wed, 09 Jan 2019 09:05:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=U31Ar9eqq2K6Hzh4pTsKC/w2QPDVrgDmdxehBhjZPqI=; b=CPvr61lB1AgxSM3mdTIjdhgyH6GMJoDIsAZ4vpKcEBBZo3qfy53xXrgBwXvQwPhIaL /B2S9ew8dkEV9zWtSDMUmuZR+xkBSZNqlhhXxO9KjHygrUVlU2kEOu+y6B74PnWnzf5Z lTkSqYHrH6k4kujV6jM6lOwg4aznnTzSXms9xfULwKtDa6R5M440Ao/c9KST8QdoXVaE d309VK6uDipkTQoAT0cNIgFQ/0YBm/qfUakWr4s1x+A6egRDQDXvWEOtEiybzld4CGCM Bvuh4jgi16tFFqQhokC14J3RLXb5R9d8+OmrDXoplXSNMd37NIgWcndn3H01ZOu93+H5 sHag== X-Gm-Message-State: AJcUukeh2MiicI98Dl0CcVkWP9uOJDj+dQDMHypqQHatIIPuEJuxgPi5 uTv++6NRaBjyuHaUN0u6Ahcvyb5JAgv5iUvzv+32kw== X-Google-Smtp-Source: ALg8bN6Fgfo4ycWsJ+motv7GNuUGDxNY0a1vl1fYMACYkf0SYo9OqUwHzNB4tqh3MH/NaK58EnNUKEDP6fXgddCdOjc= X-Received: by 2002:aca:50cf:: with SMTP id e198mr4553116oib.343.1547053085274; Wed, 09 Jan 2019 08:58:05 -0800 (PST) MIME-Version: 1.0 References: <201901091104.x09B4SVZ065656@repo.freebsd.org> <201901091641.x09Gfcc3009116@pdx.rh.CN85.dnsmgr.net> In-Reply-To: <201901091641.x09Gfcc3009116@pdx.rh.CN85.dnsmgr.net> From: Edward Napierala Date: Wed, 9 Jan 2019 16:57:53 +0000 Message-ID: Subject: Re: svn commit: r342881 - head/share/skel To: rgrimes@freebsd.org Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: F09086A856 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.90 / 15.00]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.90)[-0.898,0]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 17:05:23 -0000 =C5=9Br., 9 sty 2019 o 16:41 Rodney W. Grimes napisa=C5=82(a): > > > Author: trasz > > Date: Wed Jan 9 11:04:27 2019 > > New Revision: 342881 > > URL: https://svnweb.freebsd.org/changeset/base/342881 > > > > Log: > > Make sh(1) recognize the default $HOME. By default /home > > is a symlink; without this change, when you log in, sh(1) > > won't realize the current directory (eg '/usr/home/test') > > is the same as $HOME ('/home/test'). > > Arguably it shouldnt know any of that. sh(1) needs to know that in order to properly shorten the current directory path (in prompt) to "~" when you're there. > Or that $Home is ~ either > I hate that if I "cd home" and there is not a directory > where I am at called home it takes me to ~/$home,s > that also has caused a few script debugging to be > a royal Pita having to force ./$variable to stop > home from being treated special. But none of that seems related to the change above, does it? All the patch does is: if your current directory is $HOME, but it's spelled differently, run "cd". The only thing that does, in turn, is making sh(1) set the $ENV variable, which it uses to track the current "logical working directory", eg /home/test. It cannot obtain that information otherwise, because getcwd(3) in that directory returns its "physical path", eg /usr/home/test.