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

Implement to_string_lossy() #115

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Implement to_string_lossy() #115

wants to merge 3 commits into from

Conversation

paulc
Copy link

@paulc paulc commented Feb 6, 2024

Hello,

The attached pull request implements to_string_lossy() for Expression to provide a shell command string equivalent for the cmd pipeline (where possible). This should mostly address Issue #79 and Issue #89 and I've gone with the to_string_lossy() method name suggested in Issue #89 rather than impl Display as I think that this is clearer that this is a lossy conversion. That being said the implementation does its best to capture relatively complex cmd pipelines correctly (including multiple levels of pipe, i/o redirections, manipulating env variables and directory changes - see the embedded docs for examples).

As this relies heavily on UNIX shell syntax it is only enabled for #[cfg(unix)]

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

Successfully merging this pull request may close these issues.

1 participant