summaryrefslogtreecommitdiff
path: root/cmd2
Commit message (Collapse)AuthorAgeFilesLines
* cmdloop now checks to see if it is running in the main thread before ↵Todd Leonhardt2018-10-211-6/+9
| | | | attempting to register a signal handler for SIGINT
* Deleted Cmd.colorize() method and Cmd._colorcodes dictionary which were ↵Todd Leonhardt2018-10-181-20/+0
| | | | deprecated in 0.9.5
* Updated outdated header comment in cmd2.pyTodd Leonhardt2018-10-141-1/+1
|
* RefactoredKevin Van Brunt2018-10-131-26/+29
|
* Argparse commands called as methods of PyscriptBridge now go through ↵Kevin Van Brunt2018-10-121-14/+15
| | | | onecmd_plus_hooks
* Non-argparse commands called as methods of PyscriptBridge now go through ↵Kevin Van Brunt2018-10-121-1/+6
| | | | onecmd_plus_hooks
* You can now call a macro with extra argumentsKevin Van Brunt2018-10-122-7/+17
|
* Refactored async_alertKevin Van Brunt2018-10-111-56/+43
|
* Using wcwidth to calculate display width of promptKevin Van Brunt2018-10-111-18/+25
|
* Do not asynchronously update continuation promptsKevin Van Brunt2018-10-111-16/+26
|
* 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