Copying commands include dollar sign $
Closed this issue · 2 comments
mom3d commented
Issue Title: Copying Command Code Includes Dollar Sign
Description
When copying command code from the tutorial page, the copied text includes the dollar sign ($
). This causes issues when pasting the command into a terminal, as the dollar sign is not part of the command but a prompt indicator.
Steps to Reproduce
- Navigate to the tutorial page at https://devopswithdocker.com/part-1/section-2.
- Find a code block with a command prompt.
- Highlight and copy the command, which looks like:
$ some-command --with-parameters
- Paste the copied text into a terminal.
Expected Behavior
The copied text should exclude the dollar sign, so when pasted into the terminal, it should look like this:
some-command --with-parameters
qzuw commented
$ (or # for root) is fairly common convention in tutorials, especially if there is mix of user input and command output in the examples. Usually (in my past experience, and few quick searches right now) these also copy dollar sign.
As a workaround, you could just highlight the actual command you want to copy, without initial dollar sign.
mluukkai commented
yes, the dollar will remain