Oleksandr Gavenko
2016-02-15 22:58:08 UTC
How can I highlight interactive REPL sessions? Like:
bash# cd ~/sql
bash# mysql
Password:
[mariadb]> select 1;
Among:
http://pygments.org/docs/lexers/
I see possibility to use various:
.. code:: bash
.. code:: console
.. code:: pycon
.. code:: postgresql-console
but even with Bash it only highlight "$" sign and think my "bash#" prompt as
output...
I see a way to add to "code" additional parameter (prompt regex):
http://docutils.sourceforge.net/docs/ref/rst/directives.html#code
and implement parser in pygments or make own directive:
.. repl::
:prompt1: "^bash# "
:prompt2: "^$ "
:prompt3: "^mysql> "
Does anyone work on this?
--
http://defun.work/
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Docutils-users mailing list
Docutils-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-users
Please use "Reply All" to reply to the list.
bash# cd ~/sql
bash# mysql
Password:
[mariadb]> select 1;
Among:
http://pygments.org/docs/lexers/
I see possibility to use various:
.. code:: bash
.. code:: console
.. code:: pycon
.. code:: postgresql-console
but even with Bash it only highlight "$" sign and think my "bash#" prompt as
output...
I see a way to add to "code" additional parameter (prompt regex):
http://docutils.sourceforge.net/docs/ref/rst/directives.html#code
and implement parser in pygments or make own directive:
.. repl::
:prompt1: "^bash# "
:prompt2: "^$ "
:prompt3: "^mysql> "
Does anyone work on this?
--
http://defun.work/
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Docutils-users mailing list
Docutils-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-users
Please use "Reply All" to reply to the list.