Skip to content

Commit e87cadf

Browse files
committed
Flushed out multiline command documentation
1 parent 5a88fcf commit e87cadf

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docs/features/multiline_commands.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,17 @@ line of input. The prompt for the first line of input is specified by the
2020
``cmd2.Cmd.prompt`` instance attribute - see
2121
:ref:`features/prompt:Customizing the Prompt`. The prompt for subsequent lines
2222
of input is defined by the ``cmd2.Cmd.continuation_prompt`` attribute.
23+
24+
Use cases
25+
---------
26+
Multiline commands should probably be used sparingly in order to preserve a
27+
good user experience for your ``cmd2``-based line-oriented command interpreter
28+
application.
29+
30+
However, some use cases benefit significantly from the ability to have commands
31+
that span more than one line. For example, you might want the ability for your
32+
user to type in a SQL command, which can often span lines and which are
33+
terminated with a semicolon.
34+
35+
We estimate that less than 5 percent of ``cmd2`` applications use this feature.
36+
But it is here for those uses cases where it provides value.

0 commit comments

Comments
 (0)