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

rm: bug with trailing backslash on windows #3200

Closed
amrbashir opened this issue Feb 27, 2022 · 3 comments · Fixed by #5899
Closed

rm: bug with trailing backslash on windows #3200

amrbashir opened this issue Feb 27, 2022 · 3 comments · Fixed by #5899
Labels

Comments

@amrbashir
Copy link

amrbashir commented Feb 27, 2022

I have a bad habit of providing options at the end of the command:

rm .\some-directory\ -rf

and since I use Tab to autocomplete the path in powershell, it will add trailing backslash, and will interpret the -rf as part of the path.

rm: cannot remove '.\some-directory\ -rf': No such file or directory

It works fine if I removed the trailing backslash.

@amrbashir amrbashir changed the title rm (maybe all?): trailing options rm: bug with trailing backslash on windows Feb 27, 2022
@amrbashir
Copy link
Author

amrbashir commented Mar 4, 2022

tried to track this down a bit, and it looks like it is an issue with using clap::App::get_matches_from with wild::args_os(). using clap::App::get_matches() parses the args correctly. Not sure how to continue further.

@amrbashir
Copy link
Author

Opened an upstream issue https://gitlab.com/kornelski/wild/-/issues/7

@tertsdiepraam
Copy link
Member

@amrbashir Thank you! Let's hope it gets fixed!

cakebaker added a commit to cakebaker/coreutils that referenced this issue Jan 28, 2024
sylvestre pushed a commit to sylvestre/coreutils that referenced this issue Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants