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

Add option to specify separator for text output #489

Merged
merged 8 commits into from
Oct 19, 2023

Conversation

mkatychev
Copy link
Contributor

Added --separator <str> flag for taplo get.

From the helpdoc:

 --separator <SEPARATOR>
        A string that separates array values when printing to stdout.

        If `--separator` is specified with a non text output format, the operation will fail.

Copy link
Collaborator

@ia0 ia0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

Out of curiosity, what's the motivation behind this change? Which separator do you want to use and in which context?

crates/taplo-cli/src/commands/queries.rs Outdated Show resolved Hide resolved
crates/taplo-cli/src/commands/queries.rs Outdated Show resolved Hide resolved
Co-authored-by: Julien Cretin <github@ia0.eu>
crates/taplo-cli/src/commands/queries.rs Outdated Show resolved Hide resolved
crates/taplo-cli/src/commands/queries.rs Outdated Show resolved Hide resolved
@mkatychev
Copy link
Contributor Author

mkatychev commented Oct 12, 2023

Thanks for the PR!

Out of curiosity, what's the motivation behind this change? Which separator do you want to use and in which context?

This would be to pass in the result of taplo get -f rust-toolchain.toml 'toolchain.components' to dtolnay/rust-toolchain, the GHA asks for a comma separated string to install said components

@mkatychev mkatychev requested a review from ia0 October 12, 2023 14:55
Copy link
Collaborator

@ia0 ia0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR and the motivation explanation!

@ia0 ia0 requested a review from panekj October 12, 2023 14:58
@panekj panekj merged commit 1892861 into tamasfe:master Oct 19, 2023
4 checks passed
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.

3 participants