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 $ from command #1115
base: master
Are you sure you want to change the base?
Remove $ from command #1115
Conversation
Remove $ from command to easily paste in terminal without getting an error. $ at the beginning gives an error.
For an actual complete solution I'd suggest to continue to use .highlight .gp { /* Generic.Prompt */
user-select: none;
} |
Oh interesting! Does that also affect the copy button? |
Updating https://github.com/az-pz/hatch/blob/master/docs/assets/css/custom.css to hide |
Oh right you bring up a good point about console. @oprypin Can you recommend an approach that neglects syntax highlighting? I deliberately do not use that because the output gets highlighted randomly sometimes which I do not want users to see. |
https://github.com/search?q=repo%3Apypa%2Fhatch+%2F%5E+*%5C%24+%2F&type=code
Hmm that's the first time I hear such a conclusion on the topic, wasn't aware |
$ command foo 11 bar
Echo 123
More stuff
Why is this blue |
It's conceivable that it is late at night after a long day and I don't know what I'm talking about, perhaps I was thinking about Bash since I do appear to use console elsewhere |
Right- there can be arbitrary highlighting for the first word in the command, maybe that's what you were thinking of. But maybe we could configure and fix specific types of highlighting that you don't like, let me know The text is blue because this the "output" highlighting |
I am inclined to keep the dollar signs. Not only that, but when I think more about the situation, why would someone even press the copy button on a console snippet? Wouldn't it make more sense to disable copy there? I'm not dismissing the other potential fix for copying to ignore that character I'm just curious what both of you think. |
I definitely like dollar signs 😄 I think it can be confusing without them |
# console
$ command --that gets --syntax highlighting
no $ prefix here is for the output from command
so all of this content is intentionally the same colour
syntax highlighting for output would be awkward # bash (technically the command shouldn't have the $ prefix
$ command --that gets --syntax highlighting
no $ prefix here is for the output from command
so all of this content is intentionally the same colour
syntax highlighting for output would be awkward In mkdocs, depending on the config the syntax highlighting varies. On github with the styling above, you can see the difference between the two for actual command highlighting is not all that useful... but it's better with actual bash scripts syntax, while console is more suitable for here is a command with the output. |
Remove $ from command to easily paste in terminal without getting an error. $ at the beginning gives an error.