[OpenStack-docs] Better way to display shell commands
Lana Brindley
openstack at lanabrindley.com
Tue Jul 5 22:05:38 UTC 2016
Ah, this looks great!
Andreas: how easy is it to install this extension? Will it break things?
Lana
On 06/07/16 05:26, Ronald Bradford wrote:
> I tested the demo and highlighting of code conveniently excludes prompts (achieved via css syntax).
> It is certainly a plus to be able to cut/paste code blocks more easily.
>
> +1
>
> Ronald Bradford
>
> Web Site: http://ronaldbradford.com <http://ronaldbradford.com/>
> LinkedIn: http://www.linkedin.com/in/ronaldbradford
> Twitter: @RonaldBradford <http://twitter.com/ronaldbradford>
> Skype: RonaldBradford
> GTalk: Ronald.Bradford
> IRC: rbradfor
>
>
> On Tue, Jul 5, 2016 at 4:43 AM, Adrien Cunin <adrien at adriencunin.fr <mailto:adrien at adriencunin.fr>> wrote:
>
> Hi,
>
> From what I can see we usually use
>
> .. code-block:: console
>
> or
>
> .. code-block:: shell-session
>
> (which actually are the same)
>
> to show commands that are to be executed by the user such as
>
> # apt-get install foo
> # echo 1 > bar
>
> The main issue, and the reason I started looking into this, is that the
> html output doesn't make it easy to select commands (for copy/pasting
> typically) without the prompt.
>
> Turns out there is a Sphinx extension to do just this:
> https://github.com/sbrunner/sphinx-prompt
>
> With this extension, the following
>
> .. prompt:: bash #
>
> apt-get install foo
> echo 1 > bar
>
> will have the expected result.
> That is: looks similar to the previous version, but one can easily
> select commands without the prompt.
>
> Does it sound like a good idea?
>
> We'd need first to enable the Sphinx extension wherever we use Sphinx.
> Does that actually require to patch each git repository that contains
> documentation or do we have another way of doing it globally?
> Then, documentations should start using ".. prompt:: bash" instead of
> ".. code-block:: console" when appropriate - the change could be
> automated or not.
>
> Adrien
>
>
> _______________________________________________
> OpenStack-docs mailing list
> OpenStack-docs at lists.openstack.org <mailto:OpenStack-docs at lists.openstack.org>
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-docs
>
>
>
>
> _______________________________________________
> OpenStack-docs mailing list
> OpenStack-docs at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-docs
>
--
Lana Brindley
Technical Writer
Rackspace Cloud Builders Australia
http://lanabrindley.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 538 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openstack.org/pipermail/openstack-docs/attachments/20160706/085b8866/attachment.pgp>
More information about the OpenStack-docs
mailing list