Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show comments in yaml files #164

Open
theblop opened this issue Aug 26, 2024 · 1 comment
Open

show comments in yaml files #164

theblop opened this issue Aug 26, 2024 · 1 comment

Comments

@theblop
Copy link

theblop commented Aug 26, 2024

Is it possible to toggle comments in yaml files? It would be super useful for large commented yaml config files (e.g. helm chart value files)

Thanks!

@andres-lowrie
Copy link

Hey so this works with at least version 0.9.0

some file foo.yaml

---

key:
  - value
  - value
  - value

key2:
  - object:
      key: value
      key: value
  - object:
      key: value
      key: value
  - object:
      key: value
      key: value

and then doing

jless -m line foo.yaml

yields

{
  "key": [
    "value",
    "value",
    "value"
  ],
  "key2": [
    {
      "object": {
        "key": "value"
      }
    },
    {
      "object": {
        "key": "value"
      }
    },
    {
      "object": {
        "key": "value"
      }
    }
  ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants