-
Notifications
You must be signed in to change notification settings - Fork 14
Description
We have a consistent manner to add a dollar sign in front of each bash command on our getting started.
These have already been changed in the documentation as they were copied when using the clipboard plugin. I have given a bit of thought on the subject and based on my experience of having to remove manually the $ sign from my copies multiple times a week, I was wondering how our competitors might approach this.
I could not find examples of basic bash commands with a $ sign but I found some when the output of the bash command is explicitly shown:
I have looked at more than 15 repos here are some well known
Example twilio
Example instantsearch
Example Commander (cli tool)
Commander when explicit output is shown:

It is really hard to find example of multiples cmd in the same code block. I found one in mongo installation, but most of the commands are in a separate code block
Example Mongo Installation
Example Strip ruby
Conclusion
What I conclude from that is, if we think the user might want to copy/paste every command, then we should put them all in a separate code block. If the commands are just a showcase that will mostly not be copy/paster, we add them in the same code-block.
- Break down code block with multiple important commands into multiple code block without a preceding
$ - Leave
$on bash examples with a clear intention of showing the output of the code block - No specific rules for
$when multiple non-important command lines are written one after the other. We could say yes by default. But again this limits the user that wants to copy/paste in a bash script.




