Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

What is the "proper" way to write out "command line/command-line" in the context of documentation?

I was proofreading a README file and noticed inconsistent spelling of a phrase spelled two ways: "command line" and "command-line". I went looking for a conclusive answer and did not find much (see this archived exchange and this Microsoft style guide page). I concluded that it probably doesn’t matter and that "command line" seems to be more common, but now I’m curious; has anyone else run into this issue? If you’re an industry professional that documents your code, were you ever provided an answer?

Side note: I was debating whether or not to ask this here, as it’s certainly more of a code-adjacent question, but considering that if you’re writing code, you should be writing documentation as well, I figured it would fit the criteria of "a practical, answerable problem that is unique to software development" stated here. If this is not the case, do let me know– thanks!

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Both "command line" and "command-line" are acceptable and widely used in today’s writing. When used as an adjective before a noun, use "command-line" (with a hyphen) in your writing to help prevent confusion. For example, in the sentence "Make sure you entered the correct command-line parameter." the word "command-line" is describing a type of parameter.

When used as a noun, use "command line" (with no hyphen) in your writing. For example, in the sentence "Open the command line." the use of "command line" is used as a noun.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading