allenap / shell-quote

A Rust library for shell quoting strings, e.g. for interpolating into a Bash script. This is not as simple as most people think!
Apache License 2.0
5 stars 2 forks source link

Add extension trait `QuoteExt` #6

Closed allenap closed 11 months ago

allenap commented 11 months ago

This also radically changes the API. The free functions in the bash and sh modules are gone. Indeed, those modules are no longer public. Instead there are associated functions on Bash and Sh structs. These each implement Quoter which allows them to be used with the new extension trait, QuoteExt, which provides two methods on Vec<u8>, OsString (Unix only), and String.