Skip to content

Support Quotable<OsStr> on Windows #39

@milesj

Description

@milesj

@allenap

I see that these conversions are only available on Unix via #[cfg(unix)]: https://github.com/allenap/shell-quote/blob/master/src/lib.rs#L179 And I'm assuming that this is because it uses OsStrExt, but in practice, this makes interoperable code very awkward to work with.

On Unix I can use things "as-is" but on Windows, I always have to convert everything to a String (or equivalent), which is a lot of overhead.

Is there a reason that as_encoded_bytes() isn't used here? https://doc.rust-lang.org/std/ffi/struct.OsString.html#method.as_encoded_bytes Is it because of the note/caveats?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions