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
Change alias list output format to YAML #6603
Conversation
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.
Thanks for taking this on! Let's use YAML as it's more readable in its raw format than JSON.
|
@mislav Sure thing! I should have enough time to do that in the next day or two. |
|
@mislav I changed the output format to yaml and am looking into why the value of the gc alias is getting single-quoted (it's not occurring outside the test in command prompt, powershell, or bash). |
|
@mislav Quick question here, do we want to keep the table output for TTY mode and just output YAML when in NOTTY mode? |
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.
This looks good to me; thank you! I've pushed a change that preserves newlines in alias expansions, since if we scrub them we risk breaking the expansion script.
@samcoe For simplicity sake, let's just output the same YAML in both non-TTY and TTY modes. Table output doesn't play well with multiline aliases anyway, and YAML handles it reasonably well.
Fixes #6497
I used JSON instead of YAML as the output format, but if there's a preference towards YAML I can update it.