bug-bash
[Top][All Lists]
Advanced

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

cd -e returns syntax error


From: Chris Down
Subject: cd -e returns syntax error
Date: Sun, 24 Feb 2013 14:43:03 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

Hi all,

Unless I'm misunderstanding how it should work, `cd -P -e' does not work as
specified by the documentation. From `help cd':

    -e  if the -P option is supplied, and the current working directory
        cannot be determined successfully, exit with a non-zero status

Attempting to use it, however, returns a syntax error:

    $ echo $BASH_VERSION
    4.2.42(2)-release
    $ mkdir foo
    $ cd -P -e foo
    bash: cd: -e: invalid option
    cd: usage: cd [-L|[-P [-e]]] [dir]

This happens no matter what comes after or before -e: `cd -e', `cd -P -e' and
`cd -P -e foo' all return the same thing.

I'm using the latest version of `bash' as packaged by Arch Linux. I did a
search for any previous threads on this issue but didn't find anything, and I
didn't see anything on the devel branch (although it's possible I missed it, I
guess). Any ideas?

Best,

Chris



reply via email to

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