coreutils
coreutils copied to clipboard
rm: bug with trailing backslash on windows
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.
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.
Opened an upstream issue https://gitlab.com/kornelski/wild/-/issues/7
@amrbashir Thank you! Let's hope it gets fixed!