hofstadter-io / cuetils

CLI and library for diff, patch, and ETL operations on CUE, JSON, and Yaml
BSD 3-Clause "New" or "Revised" License
78 stars 6 forks source link

Support expression suffixes #2

Open verdverm opened 2 years ago

verdverm commented 2 years ago

files specified at the command line should support suffixes for extracting a sub value

verdverm commented 2 years ago

v0.2.0 adds support for foo.cue@a.b to select the value at path a.b inside foo.cue

This only works on the first arg (operator) to commands which take two args

verdverm commented 2 years ago

Generally, we are moving towards always loading and handling all inputs the same way. There may still be a difference when the files / values being operated on are top-level list types.

operators also support entrypoint style when commas are present, so cuetils pick a.cue,b.cue *.json will combine the first arg as a set of entrypoints