A recent PR in openssh-rust/openssh provides an implementation for escape(&OsStr) -> Cow<'_, OsStr> that I think could be a good fit here.
It was suggested in a code review that it is preferable to use shell_escape for all the escaping needs rather than rolling out a custom implementation. However, currenly shell_escape only works with Cow<str>. This PR is an attempt to extend the escaping to OsStrs as well.
iiuc #5 is a relevant issue that we may be able to resolve with this PR.
Let me know if you have any suggestions/comments about these changes and I'll be happy to improve them accordingly.
Hi, thanks for this project!
A recent PR in
openssh-rust/openssh
provides an implementation forescape(&OsStr) -> Cow<'_, OsStr>
that I think could be a good fit here.It was suggested in a code review that it is preferable to use
shell_escape
for all the escaping needs rather than rolling out a custom implementation. However, currenlyshell_escape
only works withCow<str>
. This PR is an attempt to extend the escaping toOsStr
s as well.iiuc #5 is a relevant issue that we may be able to resolve with this PR.
Let me know if you have any suggestions/comments about these changes and I'll be happy to improve them accordingly.