You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Take advantage of the fact that the lexer puts <span class="gp">$</span> around the $ and apply custom style user-select: none and padding-right: 5px to the .highlight-console span.gp class
Remove the proceeding whitespace to the command, so it is typed in as $tree /etc/ood/config
The result is this:
Original full issue description
Using "shell" format without preceding $ for commands users have to enter to do things makes it easier to copy a line: just click 3 times to highlight the line. This does copy the newline so if your shell isn't configured to not auto-execute the command when a newline is placed in (i.e. bash vs zsh) it could be bad if you want to paste, then inspect, then execute. But otherwise it is very convenient to follow through a set of directions.
One problem is that this is inconsistent and if you are copying and pasting verbatim, as in testing an install in a VM, you might accidentally enter this full string $ tree /etc/ood/config instead of tree /etc/ood/config.
In the installation instructions there are many places where users enter commands AND we want to display the output.
What do other sites do? They are all over the place.
Take advantage of the fact that the lexer puts <span class="gp">$</span> around the $ and apply custom style user-select: none and padding-right: 5px to the .highlight-console span.gp class
Remove the proceeding whitespace to the command, so it is typed in as $tree /etc/ood/config
The result is this:
The text was updated successfully, but these errors were encountered:
<span class="gp">$</span>
around the$
and apply custom styleuser-select: none
andpadding-right: 5px
to the.highlight-console span.gp
class$tree /etc/ood/config
The result is this:
Original full issue description
Using "shell" format without preceding
$
for commands users have to enter to do things makes it easier to copy a line: just click 3 times to highlight the line. This does copy the newline so if your shell isn't configured to not auto-execute the command when a newline is placed in (i.e. bash vs zsh) it could be bad if you want to paste, then inspect, then execute. But otherwise it is very convenient to follow through a set of directions.One approach is to use console format with preceeding
$
for read only with lots of output. For example, in https://osc.github.io/ood-documentation/master/release-notes/v1.3-release-notes.html#upgrading-from-v1-2 we use shell formatting for all the commands you will copy and execute, where as we use the console formatting for$ tree /etc/ood/config
because it conveniently formats the code below it.Two problems with this approach:
$ tree /etc/ood/config
instead oftree /etc/ood/config
.What do other sites do? They are all over the place.
$
in the example code$
. Example: https://devcenter.heroku.com/articles/execThe ideal might be to:
<span class="gp">$</span>
around the$
and apply custom styleuser-select: none
andpadding-right: 5px
to the.highlight-console span.gp
class$tree /etc/ood/config
The result is this:
The text was updated successfully, but these errors were encountered: