-
Notifications
You must be signed in to change notification settings - Fork 409
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
fix: handle shell arguments on Windows #214
Conversation
I've made a simple test with: cmdexpand::expand_cmd(r#" a "b \"%1\"" "#, &["c", "d"]) And got:
Is this expected? |
I'm aware that it has problem with escaped quote, but I spent yesterday fixing it in my crate and making documentation so haven't ported it here. Will find time to do it later. |
Just realized this expand thing only works with no-space argument. I tried to open a text file Pretty sure it's because the way |
I have to sleep, will investigate it tomorrow. =) |
I just tested it, and it indeed doesn't work as expected: cmd /C "nvim 'rust fmt.toml'" This results in opening two files (
Apart from these, I'm not sure if there are better solutions. Any ideas? |
I prefer the second approach. Reason is that user can use environment variable in the form |
Oh, that makes sense, It's the first time I've seen this kind of peculiar format 🤣 |
I thought it would be easy enough to make a manual parser. The code doesn't look pretty but it works (at least if users don't do anything too crazy).😅 |
1960356
to
35c9c14
Compare
I've made some simplifications, merging now. Thanks! |
Fix #192