| Commit message (Collapse) | Author | Age | Files | Lines | |
|---|---|---|---|---|---|
| * | Fixed issue with automated transcript generation via "history -t" | Todd Leonhardt | 2018-01-29 | 1 | -0/+7 |
| | | | | | There is now a post-processing step which escapes all "/" characters which transcript testing treats as a regex escape if there isn't a "\" to esape it. | ||||
| * | redirect_stderr wasn't added to contextlib until Python 3.5 | Todd Leonhardt | 2018-01-22 | 1 | -4/+6 |
| | | | | | So it turns out that we need contextlib2 for Python 3.4 and earlier. | ||||
| * | help command temporarily redirects sys.stdout and sys.stderr to self.stdout ↵ | Todd Leonhardt | 2018-01-22 | 1 | -11/+23 |
| | | | | | | | | | for argparse commands In order to make "help" behave more consistently for decorated and undecorated commands, argparse output is temporarily redirected to self.stdout. So doing "help history" is similar to "help load". However, when using the "-h" with argparse commands without using the "help" command, the output from argparse isn't redirected to self.stdout. Fixing this would be rather difficult and would essentially involve creating a pyparsing rule to detect it at the parser level. | ||||
| * | Renamed @with_argument_parser decorator to @with_argparser | Todd Leonhardt | 2018-01-21 | 1 | -3/+3 |
| | | | | | | Also: - Reanamed foo and bar subcommand methods to base_foo and base_bar | ||||
| * | History enhancements | Todd Leonhardt | 2018-01-20 | 1 | -6/+37 |
| | | | | | | | | | | | History changes: - Unknown commands are no longer saved in the history - history command now has a -t option to generate a transcript based on commands in the history Also: - Moved examples transcripts from examples to examples/transcripts - Added a new transcript for use with the pirate.py example | ||||
| * | Added unit tests for newly-overridden complete() method | Todd Leonhardt | 2018-01-20 | 1 | -0/+8 |
| | | | | | Also added a section on Sub-commands to the documentation. | ||||
| * | Added unit tests for sub-commands | Todd Leonhardt | 2018-01-20 | 1 | -1/+1 |
| | | |||||
| * | Tab-completion of subcommand names is now supported | Todd Leonhardt | 2018-01-20 | 1 | -9/+99 |
| | | |||||
| * | Added links to docs and examples to CHANGELOG.md | Todd Leonhardt | 2018-01-20 | 1 | -1/+1 |
| | | | | | Also bumped version to 0.8.0. | ||||
| * | Added support for argparse sub-commands when using cmd2 decorators | Todd Leonhardt | 2018-01-20 | 1 | -2/+20 |
| | | | | | | | | | | | | Modified the do_help() method to behave differently for methods which have been decorated with an argparse ArgumentParser. This is so that help will properly deal with sub-command help. Suppose you have a base command "base" which has two sub-commands, "foo" and "bar". Then "help base" will provide very different help text than "help base foo". Slightly tweaked the two argparse decorators to set an attribute in the decorated function's dictionary so that the do_help method can know which functions have an ArgumentParser and which do not. Added a "subcommands.py" example for demonstrating how to create and use subcommands based on argparse and the cmd2 @with_argument_parser decorator. | ||||
| * | Improved how new argparse-based decorators provide help | Todd Leonhardt | 2018-01-17 | 1 | -30/+21 |
| | | | | | | | Now "help command_name" and "command_name -h" provide exactly the same text. The function docstring for the "do_*" command sets and overrides the ArgumentParser "description" if the docstring is not empty. | ||||
| * | Cleanup of documentation and examples | Todd Leonhardt | 2018-01-17 | 1 | -1/+0 |
| | | | | | Removed usage of and reference to attributes and commands which have now been removed. | ||||
| * | Fix bug which prevented multiple history commands from being run | kotfu | 2018-01-16 | 1 | -1/+1 |
| | | |||||
| * | do_edit() no longer edits history, just files #252 | kotfu | 2018-01-16 | 1 | -77/+5 |
| | | |||||
| * | Remove do_save() and do_run() for #252 | kotfu | 2018-01-16 | 1 | -60/+8 |
| | | |||||
| * | Implement -o, -r, and -e options for issue #252 | Jared Crapo | 2018-01-15 | 1 | -10/+42 |
| | | |||||
| * | cmdenvironment command has been removed and its functionality now exists as ↵ | Todd Leonhardt | 2018-01-15 | 1 | -16/+25 |
| | | | | | a -a/--all option to the set command | ||||
| * | show command has been removed | Todd Leonhardt | 2018-01-15 | 1 | -13/+17 |
| | | | | | | | It's functionality has been moved inside the set command. The set command now uses an argparse parser. | ||||
| * | __relative_load command is now hidden from help menu by default | Todd Leonhardt | 2018-01-15 | 1 | -1/+1 |
| | | |||||
| * | Argument parsing and support currention functionality for #252 | kotfu | 2018-01-15 | 1 | -12/+16 |
| | | | | | still need to add support for -o, -r, and -e options. | ||||
| * | Renamed new decorator to @with_argparser_and_unknown_args to make it more ↵ | Todd Leonhardt | 2018-01-15 | 1 | -1/+1 |
| | | | | | descriptive | ||||
| * | Changed @with_argument_parser to only pass single argument to commands | Todd Leonhardt | 2018-01-15 | 1 | -20/+46 |
| | | | | | Also added another @with_argparser_and_list decorator that uses argparse.parse_known_args to pass two arguments to a command: both the argparse output and a list of unknown/unmatched args. | ||||
| * | Just improved a few comments which had become outdated | Todd Leonhardt | 2018-01-15 | 1 | -5/+6 |
| | | |||||
| * | Replaced @options decorator with @with_argument_list for do_edit | Todd Leonhardt | 2018-01-15 | 1 | -7/+11 |
| | | |||||
| * | Made a couple cleanup changes | Todd Leonhardt | 2018-01-15 | 1 | -12/+11 |
| | | | | | | | | | | 1) cmd2 no longer imports make_option from optparse - test files and examples now import this directly - this helps emphasize that this old optparse methodology of adding options to commands is deprecated 2) All argparsers have been given custom names instead of just "argparser" - this helps with readability and maintainability, especially with IDE renaming and such | ||||
| * | Merge branch 'arglist' of github.com:python-cmd2/cmd2 into arglist | kotfu | 2018-01-14 | 1 | -1/+5 |
| |\ | |||||
| | * | Fixed do_history unit tests and implementation | Todd Leonhardt | 2018-01-15 | 1 | -1/+1 |
| | | | |||||
| | * | Fixed @with_argument_decorator so that built-in help text is preserved | Todd Leonhardt | 2018-01-15 | 1 | -0/+4 |
| | | | |||||
| * | | convert do_pyscript() to use @with_argument_list | kotfu | 2018-01-14 | 1 | -9/+5 |
| | | | |||||
| * | | convert do_show() to argparse | kotfu | 2018-01-14 | 1 | -12/+9 |
| |/ | |||||
| * | convert do_history() to argparse | kotfu | 2018-01-14 | 1 | -20/+16 |
| | | |||||
| * | remove use_argument_list attribute | kotfu | 2018-01-14 | 1 | -6/+2 |
| | | |||||
| * | refactor onecmd() to use parse_quoted_string() | kotfu | 2018-01-14 | 1 | -7/+1 |
| | | |||||
| * | Convert built-in commands to argparsing for #250 | kotfu | 2018-01-14 | 1 | -13/+17 |
| | | | | | | | | | | | | | | This commit converts the following methods: - do_eos() - do_eof() - do_quit() - do_shortcuts() - do_cmdenvironment() - do__relative_load() - do_load() - do_help() | ||||
| * | more robust argparse and arglist decorators | kotfu | 2018-01-14 | 1 | -16/+18 |
| | | |||||
| * | add use_argument_list setting | kotfu | 2018-01-12 | 1 | -1/+13 |
| | | | | | new attribute on Cmd2.cmd which defaults to false, but if set true, causes all do_* commands to receive a list of arguments, instead of a string of what the user typed. | ||||
| * | new @with_argument_list decorator | kotfu | 2018-01-12 | 1 | -0/+18 |
| | | |||||
| * | @with_argument_parser now passes an arglist instead of a string | kotfu | 2018-01-12 | 1 | -1/+1 |
| | | |||||
| * | Fix a nasty bug in @with_argument_parser | Jared Crapo | 2018-01-10 | 1 | -3/+3 |
| | | | | | second argument of do_* methods was getting mangled when we strip quotes | ||||
| * | Set prog in argparser based on the name of the function | kotfu | 2018-01-07 | 1 | -1/+5 |
| | | |||||
| * | Properly set docstring so it contains help message | kotfu | 2018-01-07 | 1 | -1/+9 |
| | | |||||
| * | Remove leftover debugging code | kotfu | 2018-01-07 | 1 | -2/+0 |
| | | |||||
| * | Merge branch 'master' of github.com:python-cmd2/cmd2 into argparse | kotfu | 2018-01-07 | 1 | -5/+5 |
| |\ | |||||
| | * | Enabled Python 3.7 testing on Travis CI | Todd Leonhardt | 2018-01-06 | 1 | -5/+5 |
| | | | | | | | | | Also bumped version to 0.8.0a | ||||
| * | | Default posix and quote removal working. | kotfu | 2018-01-07 | 1 | -12/+10 |
| | | | |||||
| * | | Merge branch 'master' of github.com:python-cmd2/cmd2 into argparse | kotfu | 2018-01-07 | 1 | -12/+28 |
| |\ \ | |/ | |||||
| | * | Fix test_transcript.py in python 3.7 | kotfu | 2018-01-06 | 1 | -1/+16 |
| | | | | | | | | | re.escape() changed behavior in python 3.7. | ||||
| | * | Updating version and changelog in preparation for minor bug fix realease | Todd Leonhardt | 2018-01-04 | 1 | -11/+12 |
| | | | |||||
| * | | New test cases for argparse | Jared Crapo | 2018-01-07 | 1 | -2/+14 |
| | | | |||||
| * | | Merge branch 'master' of https://github.com/python-cmd2/cmd2 into argparse | Jared Crapo | 2017-12-11 | 1 | -4/+15 |
| |\ \ | |/ | |||||
