Skip to content
Commit b3a52f48 authored by Benjamin Cabé's avatar Benjamin Cabé Committed by Johan Hedberg
Browse files

doc: Configure copybutton extension for ignoring shell prompts



Add required settings for telling the copybutton Sphinx extension to
ignore prompts when copying a code block.

Both bash prompt and Zephyr UART prompt are ignored.

Examples of the new behavior:

.. code-block:: console

    $ echo "Hello World"
    Hello World

The copied text will be: 'echo "Hello World"'.

.. code-block:: console

   uart:~$ l2cap connect 29
   Chan sec: 1
   L2CAP connection pending
   Channel 0x20000210 connected
   Channel 0x20000210 status 1
   uart:~$ l2cap send 3 14
   Rem 2
   Rem 1
   Rem 0
   Outgoing data channel 0x20000210 transmitted
   Outgoing data channel 0x20000210 transmitted
   Outgoing data channel 0x20000210 transmitted

The copied text will be: 'l2cap connect 29\nl2cap send 3 14'.

Signed-off-by: default avatarBenjamin Cabé <benjamin@zephyrproject.org>
parent b640bbe1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment