-
-
Notifications
You must be signed in to change notification settings - Fork 131
feat: Add --merge
option to CLI tool
#611
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
Conversation
Do you have a use case for this that isn't solved by |
Well I'm not currently using old documents which I have no control over, if that's what you mean? But I don't want to be stuck on the This PR simply enables the existing Also, out of curiosity, why was the |
Yeah, a bit. I'd prefer to keep the CLI pretty minimal, rather than presuming that all the options it could have would have actual use. Regarding Are there other parses than
I'm afraid I wasn't around during that transition, so can't speak authoritatively. But as an implementer, it works very differently from anything else in the language and isn't really well defined. |
Not an ureasonable sentiment, but this is a single option, for a substantial feature—substantial in it's ability to cut down on a lot of duplicate config at least…
Which is exactly the kind of thing I'm getting at… I definitely don't want plain scalar
YAMLScript, and sometimes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I definitely don't want plain scalar
yes
/no
to ever be parsed as boolean, but do want to retain<<
merge ability… So if the CLI is arbitrarily restricted to--yaml 1.1
as the only way to enable the latter, I'm kind of screwed.
Ok, that makes sense. I added a couple more tests just to make sure the option was working as intended, but the code itself looks good.
yaml --single --merge --json < test.yaml