Add support for Lua input (#1810)

This commit is contained in:
Kim Alvefur
2023-10-03 16:00:51 +11:00
committed by GitHub
parent ee900ec997
commit 5fa41624c9
8 changed files with 301 additions and 2 deletions
+29 -1
View File
@@ -1,5 +1,33 @@
## Basic example
## Basic input example
Given a sample.lua file of:
```lua
return {
["country"] = "Australia"; -- this place
["cities"] = {
"Sydney",
"Melbourne",
"Brisbane",
"Perth",
};
};
```
then
```bash
yq -oy '.' sample.lua
```
will output
```yaml
country: Australia
cities:
- Sydney
- Melbourne
- Brisbane
- Perth
```
## Basic output example
Given a sample.yml file of:
```yaml
---