bug-bash
[Top][All Lists]
Advanced

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

Re: Bug report command "cd"


From: Chris Down
Subject: Re: Bug report command "cd"
Date: Thu, 4 Jul 2013 00:12:31 +0800

On 4 July 2013 00:08, Chris Down <chris@chrisdown.name> wrote:
> Greetings.
>
> On 3 July 2013 17:52, Stephan van Ingen <stephanvaningen@gmail.com> wrote:
>> stephanbosal@in-laptop3:~/Downloads/Win8$ *cd --SMSBOOT-sources-/*
>> bash: cd: --: invalid option
>> cd: usage: cd [-L|[-P [-e]]] [dir]
>> stephanbosal@in-laptop3:~/Downloads/Win8$ *cd \-\-SMSBOOT-sources-/*
>> bash: cd: --: invalid option
>
> This is not a bug, this is the way that POSIX option parsing works.
> Backslashes are not the way to solve it, because it's not that `-` is
> being interpreted as a special character, it's about the way that the
> option parser works. See
>
> The correct way is to do this:
>
>     cd -- --SMSBOOT-sources
>
> Or:
>
>     cd ./--SMSBOOT-sources

Bah, missed the link.

http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.html



reply via email to

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