| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
| |
dependency on contextlib2
|
| |
|
|
|
| |
Also:
- Reanamed foo and bar subcommand methods to base_foo and base_bar
|
| |
|
|
| |
Also added a section on Sub-commands to the documentation.
|
| |
|
|
| |
Also bumped version to 0.8.0.
|
| |
|
|
|
|
| |
I eliminated a few "narg=1" configurations so that a single str value is returned instead of a List[str].
I also reworded some documentation which was no longer correct after the last commit which made "history command" have the same help text as "command -h" when using one of the two argparse decorators.
|
| |
|
|
| |
Removed usage of and reference to attributes and commands which have now been removed.
|
| |
|
|
| |
@options optparse-based decorator
|
| |
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| | |
There are a couple unit test failures with Python 3.7-dev that we will need to look into at some point, so I disabled that build for now.
Updated all documentation to reflect that cmd2 is support on Python 2.7 and 3.4+.
Official support for Python 3.3 has been abandoned due to no longer having support to test on that platform on Travis CI.
|
| | | |
|
| |\ \
| |/ |
|
| | | |
|
| | |
| |
| |
| | |
attribute before calling super class __init__
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Also included a number of minor maintenance updates:
- Bumped version to 0.7.8 in preparation for upcoming release
- Updated Readme.md to add link to slides from recent Florida PyCon talk about cmd2
- Updated documentation on integrating cmd2 with other event loops to use newer runcmds_plus_hooks() method instead of legacy onecmds_plus_hooks method which doesn't properly deal with load commands
- Deleted old files which were used to prepare for a PyCon 2010 presentation
- Updated ChangeLog regarding this bug fix
|
| |/ |
|
| |
|
|
|
|
|
| |
info on readthedocs
I can build the docs locally and it works fine, but the autodoc part of Sphinx was failing on readthedocs
- and it was failing due to pyperclip not being present
|
| |
|
|
|
|
|
| |
Also:
- Added arg_print.py example to demonstrate this
- Bumped version to 0.7.8a
- Updated CHANGELOG
|
| | |
|
| |
|
|
|
|
| |
regexes
Also bumped version from 0.7.7a to 0.7.7 in preparation for eventual next release.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
This is to help distinguish latest code in GitHub from a version installed via pip from PyPI
|
| |
|
|
|
|
| |
Modified implementation of poutput() to accept an optional "end" argument which can change the ending to something other than a newline or simply suppress adding a newline. Also added a try/except to catch BrokenPipeError exceptions which can occupoutputr if the subprocess output is being piped to closes before the command piping output to it is finished.
Updated install docs to note that when using Python 2.7, the subprocess32 module should also be installed.
|
| | |
|
| |
|
| |
From "abrev" to "abbrev"
|
| | |
|
| |
|
|
|
|
| |
OS-default
This fixes a unit test bug where on Windows it was trying to load a utf-8 file as some other encoding starting with "cp".
|
| |
|
|
| |
Updated to reflect that the default value of abbrev is now False.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bug fixes:
- case_insensitive is no longer a runtime-settable parameter, but it was still listed as such
- Fixed a recursive loop bug when abbreviated commands are enabled and it could get stuck in the editor forever
- Added additional command abbreviations to the "exclude from history" list
- Fixed argparse_example.py and pirate.py examples
Other changes:
- Organized all attributes used to configure the ParserManager into a single location
- Set the default value of "abbrev" to False (which controls whether or not abbreviated commands are allowed)
- With good tab-completion of command names, using abbreviated commands isn't a particularly useful feature
- And it can create problems
|
| | |
|
| |
|
|
|
|
| |
It was pretty useless, it just printed a message and sat there and waited for the user to hit enter.
It didn't feel like it belonged in a top-level framework. If a particular application wants this functionality, it is a 2 line change to add it back.
|
| | |
|
| |
|
|
|
|
| |
- Added a 3rd-party dependency on the pyperclip module
TODO: Rigorous test on all OSes, particularly Linux systems without xclip
|
| |
|
|
|
|
|
|
| |
- Disabled TravisCI macOS builds because they are heavily backlogged
- Removed a file which should never have been committed
- Updated Sphinx docs to relect that the default_file_name settable parameter no longer exists
- Fixed comment in a unit test
- Fixed a unit test to use os.path.sep for cross-platform compatibility
|
| | |
|
| |
|
|
|
|
|
|
|
| |
Added information related to the new pyscript command.
The old way of running Python scripts via "py run()" should be considered deprecated. The new "pyscript" command
is superior in two significant ways:
1) It supports tab-completion of file system paths
2) It allows the user to pass command-line arguments to scripts
|
| |
|
|
| |
Updated these to reflect that the list command has been removed
|
| |
|
|
|
|
| |
Due to the way the parsing logic works for multiline commands, abbreviations didn't function properly with mutliline commands. So to avoid confusion, this commit deals with this issue by simply disallowing abbreviations for multiline commands altogether.
A warning has been added to the section on abbreviations in the documentation to hopefully make this clear for users.
|