-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a @ operator in ypath for set inclusion
The logical not operator is badly named. It is actually a set unselect operation, and this patch adds a set select operator. Assume a simple input file input.yaml as such: names: bill: 10 john: 6 ann: 8 phil: 3 other-stuff: hello: there The following command will select all names under names/ with a value larger or equal than 8 $ fy-tool --ypath '@(/names/*>=8)' input.yaml --- names: bill: 10 ann: 8 The inverse will deselect all nodes with a value larger than 8 (and all other nodes not under names/) $ fy-tool --ypath '!(/names/*>=8)' input.yaml --- names: john: 6 phil: 3 other-stuff: hello: there Signed-off-by: Pantelis Antoniou <[email protected]>
- Loading branch information
Showing
5 changed files
with
187 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters