-
Notifications
You must be signed in to change notification settings - Fork 31
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 Excess $
From Shell Blocks
#452
Comments
If you are showing a command and it's output it can help to add the ```console
$ df -h
Filesystem Size Used Avail Capacity iused ifree %iused Mounted on
/dev/disk3s1s1 926Gi 19Gi 665Gi 3% 404k 4.3G 0% /
devfs 224Ki 224Ki 0Bi 100% 774 0 100% /dev
``` $ df -h
Filesystem Size Used Avail Capacity iused ifree %iused Mounted on
/dev/disk3s1s1 926Gi 19Gi 665Gi 3% 404k 4.3G 0% /
devfs 224Ki 224Ki 0Bi 100% 774 0 100% /dev My understanding is that the copy/paste button ignores the additional lines because it thinks they are command output. You can see the highlighting clearly using the $ gcloud container clusters create rapids-gpu-kubeflow \
--accelerator type=nvidia-tesla-a100,count=2 --machine-type a2-highgpu-2g \
--zone us-central1-c --release-channel stable So removing the gcloud container clusters create rapids-gpu-kubeflow \
--accelerator type=nvidia-tesla-a100,count=2 --machine-type a2-highgpu-2g \
--zone us-central1-c --release-channel stable In any case in the docs where we have the leading |
Interestingly the GitHub copy/paste button doesn't do anything clever at all and just copies the whole box, which probably isn't what you want for |
I think it was this experience on GitHub specifically that probably led me to form this aversion to the leading Thanks for all the examples @jacobtomlinson ! Given that, I support what you said:
|
Problem
In a lot of code chunks in RAPIDs deployment documentation, only the first line of the multiline command is copied over when users hit the copy code block button - the rest are omitted
Example:
In the example above, only the first line is interpret as the command, and the following lines are interpreted as the console output from the command in the first line
Quick Fix
Removing the
$
in the beginning of the code chunkThis interprets the multiline command as a whole block of code to copy over instead of just the first line.
Pros
The text was updated successfully, but these errors were encountered: