[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: inconsistent output for cd
From: |
Chet Ramey |
Subject: |
Re: inconsistent output for cd |
Date: |
Tue, 3 Apr 2007 09:20:00 -0400 |
> Bash Version: 3.2
> Patch Level: 15
> Release Status: release
>
> It seems like this extra output only occurs when CDPATH is used for the
> cd operation. Also, popd and pushd also have similarly inconvenient
> outputs. None of this is documented in the manual, and there appear to
> be no options at all to turn this superfluous output off.
This is, as Eric Blake noted, required POSIX behavior. As to the manual:
If a non-
empty directory name from CDPATH is used, or if - is the first
argument, and the directory change is successful, the absolute
pathname of the new working directory is written to the standard
output.
This is from the description of `cd'.
`pushd' and `popd' are documented to run the `dirs' builtin upon successful
operation, and dirs will print the directory stack.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
Live Strong.
Chet Ramey, ITS, CWRU chet@case.edu http://tiswww.tis.case.edu/~chet/