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:08:39 +0800

Greetings.

On 3 July 2013 17:52, Stephan van Ingen <address@hidden> wrote:
> address@hidden:~/Downloads/Win8$ *cd --SMSBOOT-sources-/*
> bash: cd: --: invalid option
> cd: usage: cd [-L|[-P [-e]]] [dir]
> address@hidden:~/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

Best,

Chris



reply via email to

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