Skip to content

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

@joao-paulo-parity

Description

@joao-paulo-parity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions