summaryrefslogtreecommitdiff
path: root/cmd2
Commit message (Collapse)AuthorAgeFilesLines
* Syle-based refactorKevin Van Brunt2018-10-111-2/+2
|
* Fixed ArgparseFunctor to allow flag looking tokens in REMAINDER sectionsKevin Van Brunt2018-10-101-2/+4
|
* Fixed issue where flag at beginning of REMAINDER section was tab completingKevin Van Brunt2018-10-101-10/+8
|
* Added code to handle -- in argparse completerKevin Van Brunt2018-10-102-22/+43
|
* Added tests for token_resembles_flagKevin Van Brunt2018-10-091-1/+2
|
* Fixed error where an inner stream like StringIO doesn't have a buffer attribute.Kevin Van Brunt2018-10-091-2/+8
|
* Added ability for argcompleter to determine difference between flag and ↵Kevin Van Brunt2018-10-092-15/+37
| | | | negative number
* Use argparser to determine if a token looks like an optionalKevin Van Brunt2018-10-071-17/+2
|
* Allowing negative number values when checking for optional prefix charactersKevin Van Brunt2018-10-071-5/+6
|
* Added check to prevent optional value strings from being accepted as positionalsKevin Van Brunt2018-10-061-4/+23
|
* Quoting strings with utility functionKevin Van Brunt2018-10-061-5/+3
|
* Added documentation stating that parsers passed to argparse decorators need ↵Todd Leonhardt2018-10-061-2/+2
| | | | | | | to be unique Also: - Modified table_display.py to demonstrate a workaround
* Fixed unit test failures and addressed code review commentsTodd Leonhardt2018-10-062-21/+22
|
* Merge remote-tracking branch 'origin/master' into argparse_remainderEric Lin2018-10-063-33/+62
|\
| * set_window_title() will no longer write to stderr unless self._terminal_lock ↵Kevin Van Brunt2018-10-051-17/+32
| | | | | | | | can be acquired
| * Simplified codeKevin Van Brunt2018-10-051-1/+1
| |
| * No longer using stderr and self.data together to determine truthiness of a ↵Kevin Van Brunt2018-10-051-3/+10
| | | | | | | | | | | | | | CommandResult. Either self.data is used or if that's not possible, then self.stderr is used. This provided applications the ability to print to stderr even if an error didn't occur.
| * Using sub-command instead of subcommand where possible to be consistent with ↵Kevin Van Brunt2018-10-053-13/+20
| | | | | | | | argparse
* | Fixed a few edge cases:Eric Lin2018-10-061-6/+17
| | | | | | | | | | | | | | | | | | - Once the argument list can match a positional and that positional is tagged with nargs=argparse.REMAINDER it will consume all tokens including flag tokens. AutoCompleter now correctly detects this case will no longer attempt to complete flag tokens - A single-character token that is a flag prefix doesn't count as a flag and is parsed as a value. AutoCompleter now correctly detects this case.
* | Added handling of nargs=argparse.REMAINDER in both AutoCompleter and ↵Eric Lin2018-10-062-47/+117
|/ | | | | | | | ArgparseFunctor Should correctly force all subsequent arguments to go to the REMAINDER argument once it is detected. Re-arranged the command generation in ArgparseFunctor to print flag arguments before positionals Also forces the remainder arguments to always be last.
* Added hyphen to subparser titleKevin Van Brunt2018-10-041-2/+2
|
* Added title subcommand groupsKevin Van Brunt2018-10-041-2/+2
|
* Fixed issue introduced in the recent batch of changes that appended to ↵Kevin Van Brunt2018-10-041-2/+2
| | | | | | history after running a command. This is to avoid out of order history that would result if a command made another call to onecmd().
* Updated docstringKevin Van Brunt2018-10-031-2/+2
|
* Updated docstringKevin Van Brunt2018-10-031-2/+2
|
* Made encode and error class members of StdSimKevin Van Brunt2018-10-031-20/+20
|
* Fixed error where binary data was crashing getvalue. Added accessor methods ↵Kevin Van Brunt2018-10-031-13/+27
| | | | for retrieving StdSim contents as bytes.
* Tweaked some error stringsKevin Van Brunt2018-10-031-2/+2
|
* Merge branch 'master' into py_enhancementsTodd Leonhardt2018-10-031-56/+61
|\
| * Updated commentKevin Van Brunt2018-10-031-2/+2
| |
| * Commands with categories will no longer show in the 'Undocumented commands' ↵Kevin Van Brunt2018-10-031-22/+32
| | | | | | | | section
| * Don't recognize help functions for argparse commandsKevin Van Brunt2018-10-031-7/+7
| |
| * Fixed argparse help summary when no docstring was providedKevin Van Brunt2018-10-031-33/+28
| |
* | Returned cmd_echo default to False except when running a Python command at ↵Kevin Van Brunt2018-10-022-1/+3
| | | | | | | | the CLI
* | Improved documentationKevin Van Brunt2018-10-021-3/+5
| |
* | Don't worry about unquoting alias and macro names as they shouldn't be ↵Kevin Van Brunt2018-10-021-24/+10
| | | | | | | | entered this way anyway
* | Default cmd_echo to True in PyscriptBridge so things like 'py app.help()' ↵Kevin Van Brunt2018-10-021-5/+5
| | | | | | | | will show output
* | Changed PyscriptBridge.__getattr__ to raise Attribute error for non-commandsKevin Van Brunt2018-10-021-2/+6
| |
* | Changed default() to print the actual command run for unknown syntax errors.Kevin Van Brunt2018-10-021-12/+6
| | | | | | | | Fixed default() to run the resolved command instead of raw when default_to_shell is True.
* | Added echo parameter for calling commands from PyscriptKevin Van Brunt2018-10-022-8/+31
|/ | | | Documented py command's parsing limitations
* Remove self from pystate if locals_in_py is FalseKevin Van Brunt2018-10-011-0/+2
|
* Preserving quotes for do_py inputKevin Van Brunt2018-10-011-4/+6
|
* Fixed transcript testing bug where last command in transcript has no ↵Todd Leonhardt2018-09-301-1/+4
| | | | | | | expected output Also: - Added unit test for this specific case
* Small refactoringKevin Van Brunt2018-09-301-10/+5
|
* Added more code coverage with unit testsKevin Van Brunt2018-09-281-0/+4
|
* Addressing code review commentsKevin Van Brunt2018-09-281-4/+4
|
* Refactored functions to use cmd2.cmd_func()Kevin Van Brunt2018-09-281-15/+15
|
* Merge branch 'macro' into argparse_conversionKevin Van Brunt2018-09-283-39/+33
|\
| * Simplified help functionKevin Van Brunt2018-09-281-9/+4
| |
| * Removed unneeded escapes in regular expressionsKevin Van Brunt2018-09-282-3/+3
| |