| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
Changes include:
- argparse_example.py modified to do pass all unknown args onto cmd2 and allow arguments at invocation
- example.py comments modified to indicate it is intended to be used with transcript_regext.txt
- exampleSession.txt fixed so it works properly with argparse_example.py
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
The self.settable object is now an OrderedDict instead of a custom StubbornDict.
|
|
|
|
|
|
|
|
|
|
|
| |
Now by default all @options commands get passed a list of argument strings instead of a single argument string.
This is a much easier and more robust behavior to deal with. Additionally, command-line arguments are intelligently separated based on location of quotes to group things into a single argument.
WARNING: This change breaks backward compatibility for older applicaitons based on cmd2. To change the behavior to the way it used to be, add the following code to the __init__() method of our class derived from cmd2.Cmd:
cmd2.set_use_arg_list(False)
This change really does make it easier for developers new to using cmd2 however. It is to the point where I create all custom commands with @options, even if I use an empty list for the options because the argument parsing is just much better this way.
|
|
|
|
| |
A few other miscellaneous minor tweaks for whitespace and such.
|
|
Changes include:
1) Added CONTRIBUTING.md with detailed instructions for how to contribute, which should be especially useful to those new to open source in general or GitHub in particular
2) Added CODE_OF_CONDUCT.md which sets ground rules for participants’ behavior and helps to facilitate a friendly, welcoming environment
3) Renamed the "example" directory to "examples" in the hope that one day soon there may be more than a single example ;-)
|