Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

cd does not work if a directory starts with the character - #6071

Copy link
Copy link

Description

@bugnano
Issue body actions

I'm using fish version 2.7.1 running on Fedora 29 x86_64.
Let's say for example that I create a directory like this:

mkdir -- -mydirectory

this creates a directory called -mydirectory (note that its name begins with the - character)

now I want to go to that directory.

If I try to run:

cd -mydirectory

it fails with:

cd: Unknown option '-mydirectory/'
/usr/share/fish/functions/cd.fish (line 30): 
    builtin cd $argv
    ^
in function 'cd'
	called on standard input
	with parameter list '-mydirectory/'

ok, let's try with:

cd -- -mydirectory

and it fails with the error:

Too many args for cd command

So I don't know any other method to cd to that directory

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething that's not working as intendedSomething that's not working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.