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

Reach the patch by an argument sequence rather than a single argument #18

Open
joao-paulo-parity opened this issue Jul 1, 2022 · 0 comments

Comments

@joao-paulo-parity
Copy link
Contributor

Problem: paths are split by . for the get and unset commands

for key_part in key.split(".")[:-1]:

It's however possible for keys to have . within themselves, for example

[section."https://github.com/octokit"]

In those cases there's no way to get to the desired path due to the . splitting.

Solution: Accept a sequence of paths parts rather than a single string. Thus instead of

$ toml get --toml-path Cargo.toml 'section["https://github.com/octokit"]'

One would do

$ toml get --toml-path Cargo.toml section https://github.com/octokit
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 a pull request may close this issue.

1 participant