help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] Current working directory echoed to the terminal


From: Bob Proulx
Subject: Re: [Help-bash] Current working directory echoed to the terminal
Date: Tue, 10 Apr 2012 16:49:59 -0600
User-agent: Mutt/1.5.21 (2010-09-15)

Eric Blake wrote:
> Bob Proulx wrote:
> >> Unsure about the implications but for now I changed the two ‘cd -’
> >> commands to ‘cd - > /dev/null’ and the directory name is no longer
> >> echoed to the terminal.
> > 
> > The implications are that you are doing something as a workaround to
> > stop doing something else that you set it up to do.  I think it is
> > better to stop doing the thing you don't want it to do in the first
> > place and then there isn't a need for a workaround.  Do you really
> > need CDPATH set?
> 
> Careful, there's several issues here.
> 
> POSIX requires cd to give output in the following two situations:
> 
> If 'cd -' is used (regardless of CDPATH)

Ah!  Yes.  The 'cd -' is the case under discussion here and I had
missed realizing that connection.  This has nothing to do with CDPATH
as I originally thought.

Thanks for the correction.  I was off in the weeds on this one.

Bob



reply via email to

[Prev in Thread] Current Thread [Next in Thread]