<div dir="ltr">I tested the demo and highlighting of code conveniently excludes prompts (achieved via css syntax). <div>It is certainly a plus to be able to cut/paste code blocks more easily. </div><div><br></div><div>+1</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div style="font-family:arial;font-size:small">Ronald Bradford</div><div style="font-family:arial;font-size:small"><br></div><span style="color:rgb(102,102,102)">Web Site: </span><a style="color:rgb(102,102,102)" href="http://ronaldbradford.com/" target="_blank">http://ronaldbradford.com</a><br style="color:rgb(102,102,102)">
<span style="color:rgb(102,102,102)">LinkedIn: </span><a style="color:rgb(102,102,102)" href="http://www.linkedin.com/in/ronaldbradford" target="_blank">http://www.linkedin.com/in/ronaldbradford</a><br><span style="color:rgb(102,102,102)">Twitter: </span><a style="color:rgb(102,102,102)" href="http://twitter.com/ronaldbradford" target="_blank">@RonaldBradford</a><br>
<span style="color:rgb(102,102,102)">Skype: RonaldBradford</span><div><span style="color:rgb(102,102,102)">GTalk: Ronald.Bradford<br></span><div><span style="color:rgb(102,102,102)">IRC: rbradfor<br></span><br></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Tue, Jul 5, 2016 at 4:43 AM, Adrien Cunin <span dir="ltr"><<a href="mailto:adrien@adriencunin.fr" target="_blank">adrien@adriencunin.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
>From what I can see we usually use<br>
<br>
.. code-block:: console<br>
<br>
or<br>
<br>
.. code-block:: shell-session<br>
<br>
(which actually are the same)<br>
<br>
to show commands that are to be executed by the user such as<br>
<br>
# apt-get install foo<br>
# echo 1 > bar<br>
<br>
The main issue, and the reason I started looking into this, is that the<br>
html output doesn't make it easy to select commands (for copy/pasting<br>
typically) without the prompt.<br>
<br>
Turns out there is a Sphinx extension to do just this:<br>
<a href="https://github.com/sbrunner/sphinx-prompt" rel="noreferrer" target="_blank">https://github.com/sbrunner/sphinx-prompt</a><br>
<br>
With this extension, the following<br>
<br>
.. prompt:: bash #<br>
<br>
apt-get install foo<br>
echo 1 > bar<br>
<br>
will have the expected result.<br>
That is: looks similar to the previous version, but one can easily<br>
select commands without the prompt.<br>
<br>
Does it sound like a good idea?<br>
<br>
We'd need first to enable the Sphinx extension wherever we use Sphinx.<br>
Does that actually require to patch each git repository that contains<br>
documentation or do we have another way of doing it globally?<br>
Then, documentations should start using ".. prompt:: bash" instead of<br>
".. code-block:: console" when appropriate - the change could be<br>
automated or not.<br>
<span class="HOEnZb"><font color="#888888"><br>
Adrien<br>
<br>
</font></span><br>_______________________________________________<br>
OpenStack-docs mailing list<br>
<a href="mailto:OpenStack-docs@lists.openstack.org">OpenStack-docs@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-docs" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-docs</a><br>
<br></blockquote></div><br></div>