-
Notifications
You must be signed in to change notification settings - Fork 41
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
Remove leading "$ " from copy-pastable commands #20
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.
👍
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 prefer to have a leading $
to indicate a terminal prompt (#
for root) first to distinguish it from normal code, and second because it helps distinguish results of running the command in subsequent lines.
The downside is that you can't copy-paste directly the whole block into a terminal, but maybe that's enough of a speed bump for folks to be more careful about what they commands they're running.
Since we have both commands with and without output, I'd prefer to keep a consistent style throughout, which means a leading $
.
I adopted this convention working as a technical writer, where this was the established guideline in the department. For what it's worth, this convention is adopted in GitHub docs. But if a majority of us want to use a different convention here, I'll defer to the group's preferences.
I have a slight preference for retaining the leading But it's not something I feel strongly on, so thought if someone cared enough to open a PR, they probably care about this more than my level of preference, so that's why I was comfortable approving the PR. tldr, I'm fine either way, but if you really want to know I do slightly lean toward retaining it. |
No, not really! I just have the habit of making this contribution whenever I copy a GitHub snippet with the "copy to clipboard" button and end up running a command starting with I'll just close this given not everybody agrees! |
When showing both the command and logs, the leading dollar makes things more readable. However, in snippets with individual commands it doesn't make it look better, and it's more useful without since it makes the command directly pasted in the terminal work.
9b57ace
to
2467884
Compare
Just saw #74. The team seems now more aligned towards favoring easy copy-pasting, so I reopened this! |
When showing both the command and logs, the leading dollar makes things
more readable. However, in snippets with individual commands it doesn't
make it look better, and it's more useful without since it makes the
command directly pasted in the terminal work.