Revision 305e60034740f8e20221b6e00830ee0814102bd6 authored by Quentin Monnet on 07 May 2021, 10:41:24 UTC, committed by André Martins on 16 June 2021, 00:03:28 UTC
[ upstream commit 869e678b1ae3461b169259155e3bb52b6b4fa072 ]

Add a "Copy Commands" to some code blocks. This new button attempts to
copy only commands (and not their output) to the clipboard. The
distinction between commands and output relies on the presence of a
prompt symbol, either "$" or "#", at the beginning of the commands. If a
command ends with a trailing backslash, copy the next line as well.

For example, the following snippet:

    .. code-block:: shell-session

        $ ls -l
        foo
        cat
        $ echo 1 \
        2 \
                3\
            4
        $nospace
        # exit

should place the following text into the clipboard:

    ls -l
    echo 1
    2
            3
        4
    exit

The button is added for the following blocks, when they contain several
lines and at least one command is found in the block:

- "code-block", but with language "shell-session" only,
- Literal blocks ("::"),
- Parsed literals.

Signed-off-by: Quentin Monnet <quentin@isovalent.com>
Signed-off-by: Sebastian Wicki <sebastian@isovalent.com>
1 parent c7c92f2
History
File Mode Size
bpf
config
consul
eks
fuzzing
ginkgo-ext
gke
helpers
k8sT
l4lb
logger
packet
provision
runtime
standalone
Makefile -rw-r--r-- 1.0 KB
README.md -rw-r--r-- 160 bytes
Vagrantfile -rw-r--r-- 9.7 KB
archive_test_results.sh -rwxr-xr-x 302 bytes
archive_test_results_eks.sh -rwxr-xr-x 303 bytes
get-gh-comment-info.py -rw-r--r-- 606 bytes
get-vagrant-kubeconfig.sh -rwxr-xr-x 304 bytes
kubernetes-netperftest.sh -rwxr-xr-x 507 bytes
kubernetes-test.sh -rwxr-xr-x 4.0 KB
post_build_agent.sh -rwxr-xr-x 376 bytes
print-node-ip.sh -rwxr-xr-x 130 bytes
test_suite_test.go -rw-r--r-- 9.6 KB
test_test.go -rw-r--r-- 726 bytes
vagrant-ci-start.sh -rwxr-xr-x 1.3 KB
vagrant-local-create-box.sh -rwxr-xr-x 567 bytes
vagrant-local-start-runtime.sh -rwxr-xr-x 370 bytes
vagrant-local-start.sh -rwxr-xr-x 743 bytes

README.md

back to top