~gotmax23/tomcli#9: 
Support `--key` option to `lists delitem`

Opening an issue related to the proposal I previously posted on matrix. Basically consider a Cargo.toml containing

[[test]]
name = "delete_me"
path = "tests/delete_me.rs"

[[test]]
name = "keep_me"
path = "tests/keep_me.rs"

I would like to have an interface to delete the specific table based on the name, i.e.

$ tomcli set Cargo.toml lists delitem --key="name" "test" "delete_.*"

If the test is not a table, but a simple list, then it should fail if --key is passed. Maybe also vice-versa if it is a table, but --key is not defined, because it is unclear how PATTERN is supposed to be applied in that case

Status
RESOLVED IMPLEMENTED
Submitter
Cristian Le
Assigned to
Submitted
a month ago
Updated
22 days ago
Labels
No labels applied.

~gotmax23 REPORTED IMPLEMENTED a month ago

Maxwell G referenced this ticket in commit a1b6ec6.

~gotmax23 a month ago

This has been implemented! Test builds will soon be available in https://copr.fedorainfracloud.org/coprs/gotmax23/tomcli-dev/.

Cristian Le a month ago ยท edit

Tested it, works great :)

~gotmax23 22 days ago

Register here or Log in to comment, or comment via email.