summaryrefslogtreecommitdiffstats
path: root/doc/docs/terminal-sessions.rst
blob: 45af0eb8b1cfe41ee68ee8438d4c778a44294aee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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