summaryrefslogtreecommitdiff
path: root/cmd2/parsing.py
Commit message (Collapse)AuthorAgeFilesLines
* Restore self.statement_parser to a public attribute in cmd2.CmdTodd Leonhardt2019-07-101-1/+1
|
* Removed unneeded (optional) text from docstringsKevin Van Brunt2019-06-261-5/+5
|
* Fixed a few comments where "redirecting" accidentally got changed to ↵Todd Leonhardt2019-06-151-1/+1
| | | | "_redirecting"
* Began work to minimize public APITodd Leonhardt2019-06-151-2/+2
|
* Preserving originally typed quotes of Statement.output_to for use in ↵Kevin Van Brunt2019-05-131-4/+5
| | | | Statement.post_command()
* Fixed parsing issue in case where output redirection (e.g. > file) appears ↵Kevin Van Brunt2019-05-131-36/+34
| | | | | | before a pipe. In that case, the pipe was given precedence even though it appeared later in the command.
* Added capability to redirect pipe commands and chain them togetherKevin Van Brunt2019-05-071-11/+11
|
* Merge branch 'master' into macro_refactorKevin Van Brunt2019-05-061-3/+1
|\
| * Fixed issue where the wrong terminator was being appended by ↵Kevin Van Brunt2019-05-061-3/+1
| | | | | | | | Statement.expanded_command_line()
* | Refactored alias resolution to get code coverage back to 100%Kevin Van Brunt2019-05-061-11/+13
| |
* | Macro resolution now occurs during parsingKevin Van Brunt2019-05-021-21/+25
|/
* No longer appending \n to commands run by PyscriptBridge. This messes up ↵Kevin Van Brunt2019-03-191-1/+1
| | | | | | redirection parsing of non-multiline commands.
* Merge branch 'master' into attributesTodd Leonhardt2019-03-171-39/+53
|\
| * Updated docs and exampleKevin Van Brunt2019-03-171-2/+2
| |
| * Updated documentationKevin Van Brunt2019-03-161-6/+8
| |
| * Added Statement object to argparse Namespace passed to wrapped functionsKevin Van Brunt2019-03-161-39/+51
| |
* | Aliases are now stored within the StatementParser instanceTodd Leonhardt2019-03-161-3/+3
| | | | | | | | | | | | | | Also: - Added read-only aliases property to cmd2.Cmd to get aliases from the StatementParser - Added a setter for the allow_redirection property in cmd2.Cmd - Made some initialization code more self-documenting
* | Improved type hints and documentation in StatementParser.__init__()Todd Leonhardt2019-03-141-9/+20
| |
* | Made several attributes of StatementParser immutableTodd Leonhardt2019-03-141-6/+6
|/ | | | | | | The following attributes within StatementParser were converted from mutable lists to immutable tuples: - terminators - multiline_commands - shortcuts
* Updated a comment and moved an importKevin Van Brunt2019-03-061-1/+1
|
* Moved some utility functions from cmd2.py to parsing.pyTodd Leonhardt2019-03-051-12/+40
|
* Added a shlex.split() wrapper to have a common way of calling it.Kevin Van Brunt2019-03-051-1/+11
| | | | Replaced parse_quoted_string with _get_command_arg_list.
* Merged master into history and resolved conflictsTodd Leonhardt2019-03-041-44/+10
|\
| * Removed support for c-style and embedded commentsKevin Van Brunt2019-03-011-44/+10
| |
* | Fixed a couple bugs and added unit testsTodd Leonhardt2019-03-031-1/+3
| |
* | Potential fixes for outstanding multi-line issues in history commandTodd Leonhardt2019-03-031-3/+3
| |
* | Merge branch 'master' into historyKevin Van Brunt2018-12-061-3/+3
|\ \ | |/
| * Fix flake8 issuesTodd Leonhardt2018-12-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit contains a very large number of trivial changes in order to fix flake8 errors and warnings. Predominantly these are whitespace changes. Additionally, the build for Python 3.7 on TravisCI has been tweaked to fail if there are any flake8 errors using the following commandline: * flake8 . --count --ignore=E252 --max-complexity=31 --max-line-length=127 --show-source --statistics NOTE: In the future the max cyclomatic complexity should be lowered, but some improvements need to be made first. One flake8 error is being ignored entirely: * E252 missing whitespace around parameter equals * ignored because it doesn't correctly deal with default argument values after a type hint A few flake8 errors are being selectively ignored in certain files: * C901 fuction is too complex * ignored in argparse_completer.py because the complex code is an override of argparse complexity * E302 expected 2 blank lines after ... * ignored in all unit test files for convenience * F401 module imported but unused * ignored in cmd2/__init__.py because imports are for convenience of cmd2 developers and backwards compatibility * F821 undefined name * ignored in cmd2 script files which are intended to run only within cmd2 applications via pyscript where "app" and "cmd" are defined
* | First version of adding an expanded option to history itemsKevin Van Brunt2018-12-031-0/+20
|/
* You can now call a macro with extra argumentsKevin Van Brunt2018-10-121-2/+2
|
* Removed unneeded escapes in regular expressionsKevin Van Brunt2018-09-281-2/+2
|
* Addressing code review commentsKevin Van Brunt2018-09-281-2/+3
|
* Changes requested in code reviewKevin Van Brunt2018-09-271-1/+1
|
* RefactoredKevin Van Brunt2018-09-271-2/+2
|
* Addressing code review commentsKevin Van Brunt2018-09-271-1/+1
|
* Fixed bug in handling unicode digits in macro argumentsKevin Van Brunt2018-09-271-8/+10
|
* Added unit tests for MacroArg regular expressionsKevin Van Brunt2018-09-271-2/+4
|
* Made macro argument patterns class members of MacroArgKevin Van Brunt2018-09-271-11/+11
|
* More unit tests for aliases and macrosKevin Van Brunt2018-09-261-7/+6
|
* Added ability to preserve quotes in argparse and arglist decorated functions ↵Kevin Van Brunt2018-09-261-6/+7
| | | | to support aliases and macros
* Finished macro commands. Still needs testing.Kevin Van Brunt2018-09-251-4/+4
|
* Added macro deleteKevin Van Brunt2018-09-251-18/+19
|
* Backing up macro command workKevin Van Brunt2018-09-241-0/+44
|
* Added some more alias verificationKevin Van Brunt2018-09-241-1/+1
|
* Merge branch 'master' into macroKevin Van Brunt2018-09-201-10/+10
|\
| * Removed use of type argument in attr.ib() since that wasn't added until ↵Todd Leonhardt2018-09-201-10/+10
| | | | | | | | | | | | | | | | version 17.3.0. Also: - In setup.py require version of attrs to be >= 16.3.0 - I think this is right, if there are any issues we can bump this to version 17.1.0
| * Fix attrs usage so it works with older versions of attrsTodd Leonhardt2018-09-201-2/+2
| |
* | Converted alias command to one with subcommandsKevin Van Brunt2018-09-181-8/+17
|/
* Fix bug in `parse_command_only`kotfu2018-09-091-7/+8
| | | | More robust unit tests identified a bug, which is also fixed in this commit.
* Added/updated documentation for `Statement`kotfu2018-09-091-15/+73
|