Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #11928
| Path | csiph.com!xmission!news.glorb.com!usenet.stanford.edu!not-for-mail |
|---|---|
| From | Chet Ramey <chet.ramey@case.edu> |
| Newsgroups | gnu.bash.bug |
| Subject | Re: OLDPWD unset when bash starts |
| Date | Thu, 26 Nov 2015 12:41:12 -0500 |
| Organization | ITS, Case Western Reserve University |
| Lines | 17 |
| Approved | bug-bash@gnu.org |
| Message-ID | <mailman.768.1448559682.31583.bug-bash@gnu.org> (permalink) |
| References | <453853448.7488208.1447875868401.JavaMail.yahoo.ref@mail.yahoo.com> <453853448.7488208.1447875868401.JavaMail.yahoo@mail.yahoo.com> |
| Reply-To | chet.ramey@case.edu |
| NNTP-Posting-Host | lists.gnu.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | 7bit |
| X-Trace | usenet.stanford.edu 1448559682 10785 208.118.235.17 (26 Nov 2015 17:41:22 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| Cc | chet.ramey@case.edu |
| To | John Wiersba <jrw32982@yahoo.com>, "bug-bash@gnu.org" <bug-bash@gnu.org> |
| Envelope-to | bug-bash@gnu.org |
| User-Agent | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
| In-Reply-To | <453853448.7488208.1447875868401.JavaMail.yahoo@mail.yahoo.com> |
| X-Mirapoint-Virus-RAPID-Raw | score=unknown(0), refid=str=0001.0A020205.56574439.0091,ss=1,re=0.000,fgs=0, ip=174.130.23.102, so=2015-08-12 04:07:17, dmn=2011-05-27 18:58:46 |
| X-Mirapoint-Loop-Id | 0021fe52620fa8453103451c7aa128aa |
| X-Junkmail-Whitelist | YES (by domain whitelist at mpv4-2015.case.edu) |
| X-Mirapoint-Virus-RAPID-Raw | score=unknown(0), refid=str=0001.0A020206.56574439.016F,ss=1,re=0.000,fgs=0, ip=174.130.23.102, so=2015-08-12 04:07:17, dmn=2011-05-27 18:58:46 |
| X-Mirapoint-Loop-Id | 281111ea604e927f257a255a13547da9 |
| X-detected-operating-system | by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] |
| X-Received-From | 129.22.103.195 |
| X-BeenThere | bug-bash@gnu.org |
| X-Mailman-Version | 2.1.14 |
| Precedence | list |
| List-Id | Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org> |
| List-Unsubscribe | <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe> |
| List-Archive | <http://lists.gnu.org/archive/html/bug-bash> |
| List-Post | <mailto:bug-bash@gnu.org> |
| List-Help | <mailto:bug-bash-request@gnu.org?subject=help> |
| List-Subscribe | <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe> |
| Xref | csiph.com gnu.bash.bug:11928 |
Show key headers only | View raw
On 11/18/15 2:44 PM, John Wiersba wrote: > Why does bash clear OLDPWD when a child script is started? Because a new shell does not have a `previous working directory'. It's supposed to be set by cd, and if you haven't executed cd, you don't have one. It seems reasonable to inherit OLDPWD if it names a directory, in the same way that the shell inherits PWD if it names the current directory, so we'll try that for the next bash version. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/
Back to gnu.bash.bug | Previous | Next | Find similar
Re: OLDPWD unset when bash starts Chet Ramey <chet.ramey@case.edu> - 2015-11-26 12:41 -0500
csiph-web