Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot cd up multiple directories normally #76

Closed
chrisant996 opened this issue Feb 23, 2021 · 2 comments
Closed

Cannot cd up multiple directories normally #76

chrisant996 opened this issue Feb 23, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@chrisant996
Copy link
Owner

Originally reported by @LucasMonastirsky and @ovasquez in cmderdev/cmder#2473

Current behavior

1.3.17

cd ../..     # goes up 2 directories [Correct]
cd ../../    # stays in the same directory [Incorrect]

Expected behavior

1.3.16 and 1.3.15 (and probably a lot more before)

cd ../..     # goes up 2 directories [Correct]
cd ../../    # goes up 2 directories [Correct]
@chrisant996
Copy link
Owner Author

I can reproduce this. Will look into it soon.

@chrisant996
Copy link
Owner Author

Wow. GetFileAttributesW(L"cd ../../") returns 0x10 indicating "the specified string is a directory".

Which actually makes sense since the final .. counteracts the preceding directory level, so the cd .. is interpreted as a parent directory that's being discarded.

Clink needs to be smarter about how it parses the command line to interpret whether a path has been typed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant