diff options
author | Matthäus G. Chajdas <dev@anteru.net> | 2020-08-22 15:47:03 +0200 |
---|---|---|
committer | Matthäus G. Chajdas <dev@anteru.net> | 2020-08-22 15:47:03 +0200 |
commit | a57edeccc6b6325e4234f128aac349ee037bd9a4 (patch) | |
tree | 0da0e61e7c75409ff7c04b033a6b3e7fb5bb410c /doc/languages.rst | |
parent | f59621498e6dc479e4a40caca93f907529756f01 (diff) | |
download | pygments-git-a57edeccc6b6325e4234f128aac349ee037bd9a4.tar.gz |
Manually merge PR#1497.
This is a manual merge as we don't want to pull in the documentation
change as part of this fix for a cleaner history.
Diffstat (limited to 'doc/languages.rst')
-rw-r--r-- | doc/languages.rst | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/doc/languages.rst b/doc/languages.rst index ecb9d460..1bb7e7f9 100644 --- a/doc/languages.rst +++ b/doc/languages.rst @@ -293,6 +293,54 @@ Other markup * YANG * Windows Registry files + +Interactive terminal/shell sessions +----------------------------------- + +To highlight an interactive terminal or shell session, prefix your code snippet +with a specially formatted prompt. + +Supported shells with examples are shown below. In each example, prompt parts in +brackets ``[any]`` represent optional parts of the prompt, and prompt parts +without brackets or in parenthesis ``(any)`` represent required parts of the +prompt. + +* **Bash Session** (console, shell-session): + + .. code-block:: console + + [any@any]$ ls -lh + [any@any]# ls -lh + [any@any]% ls -lh + $ ls -lh + # ls -lh + % ls -lh + > ls -lh + +* **MSDOS Session** (doscon): + + .. code-block:: doscon + + [any]> dir + > dir + More? dir + +* **Tcsh Session** (tcshcon): + + .. code-block:: tcshcon + + (any)> ls -lh + ? ls -lh + +* **PowerShell Session** (ps1con): + + .. code-block:: ps1con + + PS[any]> Get-ChildItem + PS> Get-ChildItem + >> Get-ChildItem + + ... that's all? --------------- |