You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
order of KEY and ACTION could be inverted, as we first browse, then think to
what we'd like to do with the target.
get-value ACTION could then be the default action and be removed.
and a separate optional [--get-keys | --get-values | --get-key-values | --get-type] could be
enough for all remaining ACTIONs.
Some deeper reflection on these subject might help to get further:
. (dot) is the get-value action in some ways. Why not put all in the KEY and remove the need of
ACTION. KEY would be a way to map a YAML entry into a list of YAML (possibly a list of 1 element).
This would require special chars to map to meanings as current keys, values.
how to differentiate between a list in one YAML entry and a list of YAML separated entries ?
The text was updated successfully, but these errors were encountered:
all the --get-* are mutually exclusive and optional (choose one of them or none of them), and
they work on the YAML value currently targetted by KEY
if they finish with a s, then they'll output a list of values that requires a separator, by default
this separator is \n, but can be changed to \0 thanks to -0 option.
if it mentions key then it works only on struct. --get-values on struct only return list of values.
The current command line API has lots of thing left to be desired.
get-
(get-values
andvalues
) ?get-value
andget-values
) ?-0
seems like a bad smell, why not a separate option ?-0
Some others concerns raised:
KEY
andACTION
could be inverted, as we first browse, then think towhat we'd like to do with the target.
get-value
ACTION could then be the default action and be removed.[--get-keys | --get-values | --get-key-values | --get-type]
could beenough for all remaining ACTIONs.
Some deeper reflection on these subject might help to get further:
.
(dot) is theget-value
action in some ways. Why not put all in the KEY and remove the need ofACTION. KEY would be a way to map a YAML entry into a
list of YAML
(possibly a list of 1 element).keys
,values
.The text was updated successfully, but these errors were encountered: