File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -227,8 +227,8 @@ class CmdLineApp(cmd2.Cmd):
227227
228228## Unknown Positional Arguments
229229
230- To pass all unknown arguments to be passed to your command as a list of strings, then decorate the
231- command method with the ` @with_argparser(..., with_unknown_args=True) ` decorator.
230+ To pass all unknown arguments to your command as a list of strings, then decorate the command method
231+ with the ` @with_argparser(..., with_unknown_args=True) ` decorator.
232232
233233Here's what it looks like:
234234
Original file line number Diff line number Diff line change @@ -73,34 +73,34 @@ already parsed.
7373
7474A ` Statement ` object is a subclass of ` str ` that contains the following attributes:
7575
76- command
76+ ** command**
7777
7878: Name of the command called. You already know this because of the method ` cmd2 ` called, but it can
7979sometimes be nice to have it in a string, i.e. if you want your error messages to contain the
8080command name.
8181
82- args
82+ ** args**
8383
8484: A string containing the arguments to the command with output redirection or piping to shell
8585commands removed. It turns out that the "string" value of the ` Statement ` object has all the output
8686redirection and piping clauses removed as well. Quotes remain in the string.
8787
88- command_and_args
88+ ** command_and_args**
8989
9090: A string of just the command and the arguments, with output redirection or piping to shell
9191commands removed.
9292
93- argv
93+ ** argv**
9494
9595: A list of arguments a-la ` sys.argv ` , including the command as ` argv[0] ` and the subsequent
9696arguments as additional items in the list. Quotes around arguments will be stripped as will any
9797output redirection or piping portions of the command.
9898
99- raw
99+ ** raw**
100100
101101: Full input exactly as typed by the user.
102102
103- terminator
103+ ** terminator**
104104
105105: Character used to end a multiline command. You can configure multiple termination characters, and
106106this attribute will tell you which one the user typed.
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ an error occurs in which it is more desirable to display a message than a stack
8484has a member called ` apply_style ` . Set this False if the error style should not be applied. For
8585instance, ` ArgparseCompleter ` sets it to False when displaying completion hints.
8686
87- ## Tab Completion Using argparse Decorator {: #argparse-based }
87+ ## Tab Completion Using the argparse Decorator {: #argparse-based }
8888
8989When using ` cmd2 ` 's [ @with_argparser] [ cmd2.with_argparser ] decorator, ` cmd2 ` provides automatic tab
9090completion of flag names.
You can’t perform that action at this time.
0 commit comments