diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-03-16 23:48:37 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-03-16 23:48:37 -0400 |
commit | 28b7ec2ae2531366d41805b19700ca93677502b4 (patch) | |
tree | 06b15ebf206b4feda59254d6d3ae280b6bdd1bdd /cmd2/parsing.py | |
parent | b61728ea7e47e2f2bbbb91e0a825c70275e476da (diff) | |
download | cmd2-git-28b7ec2ae2531366d41805b19700ca93677502b4.tar.gz |
Updated documentation
Diffstat (limited to 'cmd2/parsing.py')
-rw-r--r-- | cmd2/parsing.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/cmd2/parsing.py b/cmd2/parsing.py index cbb220fb..f2fe7628 100644 --- a/cmd2/parsing.py +++ b/cmd2/parsing.py @@ -348,9 +348,10 @@ class StatementParser: Lex a string into a list of tokens. Shortcuts and aliases are expanded and comments are removed :param line: the command line being lexed - :param expand: if True, then aliases and shortcuts will be expanded - set this to False if the first token does not need to be expanded - because the command name is already known (Defaults to True) + :param expand: If True, then aliases and shortcuts will be expanded. + Set this to False if no expansion should occur because the command name is already known. + Otherwise the command could be expanded if it matched an alias name. This is for cases where + a do_* function was called manually (e.g do_help('alias'). :return: A list of tokens :raises ValueError if there are unclosed quotation marks. """ @@ -377,9 +378,10 @@ class StatementParser: redirection directives. :param line: the command line being parsed - :param expand: if True, then aliases and shortcuts will be expanded - set this to False if the first token does not need to be expanded - because the command name is already known (Defaults to True) + :param expand: If True, then aliases and shortcuts will be expanded. + Set this to False if no expansion should occur because the command name is already known. + Otherwise the command could be expanded if it matched an alias name. This is for cases where + a do_* function was called manually (e.g do_help('alias'). :return: A parsed Statement :raises ValueError if there are unclosed quotation marks """ |