summaryrefslogtreecommitdiff
path: root/cmd2/parsing.py
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
|
* Took a stab at improving documentation and unit tests for ↵Todd Leonhardt2018-09-081-0/+1
| | | | | | Statement.parse_command_only() Also slightly improved a few other unit tests
* Simplified override of __new__Todd Leonhardt2018-09-061-13/+2
| | | | Eliminated redundant type information, since that is all being provided by attr.ib() calls
* Use attrs on Statement object to do immutabilityTodd Leonhardt2018-09-061-59/+40
|
* Replace previously removed Statement initialization parameterskotfu2018-09-051-2/+3
| | | | Statement is a subclass of str. Statement.__new__ should behave like str.__new__. Meaning it should accept any object as it’s argument, and our extended initialization parameters (i.e. command, arg_list) should not be allowed as positional arguments, only named arguments.
* Add back previously removed tests for statement.argskotfu2018-09-051-1/+1
|
* Made it possible for editors like Pycharm to see members of Statement in tab ↵Kevin Van Brunt2018-09-051-40/+37
| | | | completion. This also fixed many warnings.
* Updated commentKevin Van Brunt2018-09-011-3/+2
|
* Removed unused importKevin Van Brunt2018-09-011-1/+1
|
* Using empty strings and lists instead of None for default values in StatmentKevin Van Brunt2018-09-011-64/+71
|
* Removed Statement.args since it was redundant. Replaced with already parsed ↵Kevin Van Brunt2018-08-231-24/+13
| | | | list of args with quotes preserved.
* No longer returning None from arg_listKevin Van Brunt2018-08-231-3/+3
|
* Fixed bug where alias was dropping quotesKevin Van Brunt2018-08-231-1/+12
|
* parse_command_only now appropriately sets multiline_commandkotfu2018-08-081-4/+11
|
* Merged master with bug fix for #474Todd Leonhardt2018-07-171-10/+8
|\
| * Bug fix and unit tests for #474kotfu2018-07-161-10/+8
| |
* | Merge branch 'master' into plugin_functionskotfu2018-07-101-1/+1
|\ \ | |/
| * Use instance attribute for terminatorsKyle Sunden2018-07-101-1/+1
| | | | | | If the `terminators` is the default, `None`, the function fails because the local variable was not updated.
* | Fixed a couple type hints and minor pep8-style formatting issuesTodd Leonhardt2018-07-091-17/+18
| |
* | Move LINE_FEED into constantskotfu2018-07-071-5/+3
| |
* | Merge branch 'master' into plugin_functionskotfu2018-06-191-4/+20
|\ \ | |/
| * Allowing quoted paths when piping and redirectingKevin Van Brunt2018-06-071-4/+20
| |
* | Fixed issue with parsing.py on Python 3.4 and 3.5Todd Leonhardt2018-06-051-15/+14
| | | | | | | | Apparently versions of Python prior to 3.6 don't allow a comma after the last argument being passed to a method.
* | Make statement feel immutable and add type hintingkotfu2018-06-031-35/+64
| |
* | Clarify documentation and change parse() parameter namekotfu2018-05-271-4/+8
|/
* Fix bug in sequential terminator logickotfu2018-05-171-0/+9
|
* Added check to support a continuous run of a terminator to end a lineKevin Van Brunt2018-05-161-10/+5
|
* Remove cmd2.Cmd.redirector for #381kotfu2018-05-101-17/+21
|
* Make alias checking and command parsing use the same regexkotfu2018-05-071-11/+51
| | | | | | | | Provide a new is_valid_command() method on StatementParser to determine whether a string of characters could be a valid command. That means it can’t include any redirection, quote chars, whitespace, or terminator characters. This method is used when someone tries to create an alias, to ensure when we try and parse the alias that it will actually parse. This nicely encapsulates and standardizes all the logic for parsing and expansion into the StatementParser class. Also fix a bug in the regex to match valid command names, and add a bunch of new unit tests to ensure the bug stays fixed.
* Fix bungled merge from masterkotfu2018-05-061-10/+16
|