Skip to content
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

README clarification about cross-platform #42

Closed
hoijui opened this issue Nov 10, 2021 · 2 comments
Closed

README clarification about cross-platform #42

hoijui opened this issue Nov 10, 2021 · 2 comments

Comments

@hoijui
Copy link

hoijui commented Nov 10, 2021

xshell provides a set of cross-platform utilities for writing ergonomic "bash" scripts

when I see bash in quotes, and read cross-platform, and know it is doing this stuff from within rust, my mind tells me:

Oh, this must use a rust-native reimplementation of common *NIX shell utilities

But reading more, I get the idea that... it is something else, and running "sed -e ..." with this tool on windows would fail on a bare windows without extra BASH utilities installed, for example.
Thus, I would like to see this clarified in the README and docs - in what way is this cross-platform?

@matklad
Copy link
Owner

matklad commented Nov 10, 2021

That’s the right intuition! We don’t have sed, but we do have more basic stuff like cd, cp, rm, etc: https://docs.rs/xshell/0.1.17/xshell/#functions

Adding something like sed is totally in scope for xshell. Although in this specific case, I’d say that probably writing usual Rust code withregex would be ergonomic enough.

The bash is in quotes because, rather than providing a literal POSIX-compatible environment, we provide whatever is needed to get a similar feeling.

@hoijui
Copy link
Author

hoijui commented Nov 10, 2021

oh wow.... OK! :-)
then.. all good I guess.. thank you!
and.. cool! :-)
..and indeed.. rust regex makes more sense then sed.

@matklad matklad closed this as completed Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants