View on GitHub

Sphinx-prompt

Sphinx directive to add unselectable prompt

Examples

.. prompt:: bash

    cd <folder>
    cp <src> \
        <dst>
    cd -
        
=>
cd <folder>
cd -
cp <src> \
    <dst>

.. prompt:: bash #

    cd 
    cd -
        
=>
cd <folder>
cd -

.. prompt:: bash $,# auto

    $ sudo
    # exit
    $
        
=>
sudo
exit

.. prompt:: bash $,(env)...$ auto

    $ source env/bin/activate
    (env)...$ deactivate
    $
        
=>
source env/bin/activate
deactivate