yq/pkg/yqlib/doc/usage
Robert Lee 1f2b0fe76b Add --shell-key-separator flag for customizable shell output format
- Add ShellVariablesPreferences struct with KeySeparator field (default: '_')
- Update shellVariablesEncoder to use configurable separator
- Add --shell-key-separator CLI flag
- Add comprehensive tests for custom separator functionality
- Update documentation with example usage for custom separator

This feature allows users to specify a custom separator (e.g. '__') when
outputting shell variables, which helps disambiguate nested keys from
keys that contain underscores in their names.

Example:
  yq -o=shell --shell-key-separator='__' file.yaml

Fixes ambiguity when original YAML keys contain underscores.
2025-11-07 20:02:58 +11:00
..
headers Comments in yq expressions! #1919 2024-02-09 13:54:27 +11:00
convert.md Refactoring Yaml encoder prefs 2024-02-24 15:36:16 +11:00
csv-tsv.md Added new CSV option to turn off auto-parsing #1947 2024-02-15 13:11:53 +11:00
formatting-expressions.md Adding shebang documentation 2024-02-16 11:03:35 +11:00
lua.md Lua output fixes (#1811) 2023-10-12 11:25:26 +11:00
properties.md Update docs and tests for --properties-separator flag 2025-01-22 09:53:51 +11:00
recipes.md Added prune recipe 2024-02-21 14:50:55 +11:00
shellvariables.md Add --shell-key-separator flag for customizable shell output format 2025-11-07 20:02:58 +11:00
toml.md Empty TOML table is an empty object 2024-02-08 13:31:56 +11:00
xml.md fix: keep xml namespace prefixes for tags 2025-10-12 13:42:24 +11:00