-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
main: Various minor tweaks to our main help output #26695
Conversation
This is just a husk of a container command that has no nested commands under it, so it isn't serving any purpose.
These are commands that either no longer do anything aside from emitting an error message or are just backward-compatibility aliases for other commands. This generalizes our previous situation where we were specifically hiding "internal-plugin", and does so in a way that fixes the long-standing cosmetic bug that the column width in the help output was chosen based on the hidden command "internal-plugin", which is unfortunately also the longest command in our command set.
A long time ago we introduced this separation between "common commands" and "all other commands", but over the intervening years we've not really done a good job of classifying new commands we've added and so by default most of them ended up being classified as "common". In the interests of making this output more useful for those getting started, this switches the two categories so that "Main commands" is now the curated list, and "all other commands" is the bucket for everything else. The intent here is that the "main commands" are the ones users are likely to try as part of their initial learning of Terraform, while the other commands are for less common situations where the user is more likely to learn about a specific command in some other context, like a tutorial about a special situation. The "main commands" are also now ordered by the sequence users will typically run them in, rather than alphabetical order. That's a subjective readability tradeoff, but I think as long as the list stays relatively short (which it should) it's still relatively easy to scan and find a particular command in the shortlist.
The short description of our commands (as shown in the main help output from "terraform") was previously very inconsistent, using different tense/mood for different commands. Some of the commands were also using some terminology choices inconsistent with how we currently talk about the related ideas in our documentation. Here I've tried to add some consistency by first rewriting them all in the imperative mood (except the ones that just are just subcommand groupings), and tweaking some of the terminology to hopefully gel better with how we present similar ideas in our recently-updated docs. While working on this I inevitably spotted some similar inconsistencies in the longer-form help output of some of the commands. I've not reviewed all of these for consistency, but I did update some where the wording was either left inconsstent with the short form changes I'd made or where the prose stood out to me as particularly inconsistent with our current usual documentation language style. All of this is subjective, so I expect we'll continue to tweak these over time as we continue to develop our documentation writing style based on user questions and feedback.
This just reduces the amount of space between different elements on in the main help output from four columns to two. The main motivation here was to give some of the longer command descriptions a little more horizontal breathing room, but subjectively I also find the tighter column gutters easier to scan. Others may disagree, of course.
My initial motivation here was to update the example output from Terraform's top-level help list to match recent updates in the layout and language used. However, while here I took the opportunity to update some dated language that was not consistent with our modern documentation writing style, in particular including a totally unnecessary and potentially-alienating claim that Terraform is "very easy to use". Our modern writing style discourages this sort of "boastful" language and encourages us to focus on the facts at hand.
Codecov Report
|
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.
Thank you for picking this up!! Is this a candidate for 0.14 as well? The help there still shows 0.12upgrade
etc under "All other commands" and it bothers me and I like that with this it's gone!
Note: Since you remove the |
I had not been planning on backporting this to 0.14; my motivation here was more of a "general clean up on the way to 1.0" sort of thing, and so I don't feel much urgency about it. The various oddities have been there for several years so I feel like a few more months won't hurt. I could probably be persuaded otherwise, though. 😀 While you're right that removing the |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
This is very much a case of my having an extra little bit of time at the end of my week and so using it to tackle a relatively-minor thing that's been kinda bothering me for a while...
This set of commits makes an assortment of different adjustments to code that contributes to the help output that Terraform prints when you just run
terraform
with no other arguments, aiming to make it more useful to folks who are just getting started, slightly more compact in general, and more consistent in its writing style.The sum of all of this is the following output:
Some highlights here are:
debug
command, which previously did nothing except claim to be a container command even though it had no nested commands, is now removed entirely.