| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| | |
|
|\ \
| |/ |
|
| |
| |
| |
| | |
Added unit tests
|
| | |
|
| | |
|
|\ \
| |/ |
|
| |\ |
|
| | |\ |
|
| | |\ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
codes since cmd2 deals with that
Also:
- Finished editing poutput(), ppaged(), and pfeedback() methods to strip ANSI color when appropriate
- Changed attr.ib() factory usage so cmd2 is compatible with older versions of attrs
|
| | |\ \ \ |
|
| | |\ \ \ \
| | | | | | |
| | | | | | |
| | | | | | | |
@kotfu - I hope this doesn't screw you up, but I wanted to minimize some of the merge pain that will likely be coming up soon
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
- colors setting now allows Always, Terminal, Never values
- poutput() and perror() honor these new settings
|
| | | | | | | |
|
|/ / / / / / |
|
| |_|_|_|/
|/| | | | |
|
| |_|_|/
|/| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Now there is a single class, StdSim in utils.py, which is intended to simulate stdout and stderr file objects.
This class replaced the following:
- pyscript_bridge.py::CopyStream
- transcript.py::OutputTrap
- conftest.py::StdOut
|
| |_|/
|/| | |
|
| |/
|/| |
|
|/
|
|
| |
easier to format help/description text
|
|
|
|
|
|
| |
Added better error checking when loading readline history file
Improved some error messages
Changed IOError usages to OSError since they were merged in Python 3.3.
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Added some shared definitions to cmd2/__init__.py -> maybe there's a better place for these?
Figured out how to trick bash into showing argument hints. It's a bit weird.
Updated all of the tests and examples to import cmd2 resources from their new location without the automatic imports in cmd2/__init__.py
For #369
|
|/
|
|
| |
to False
|
| |
|
|
|
|
|
|
|
|
|
| |
Changed the detection of with_argparse decorated commands to be less hacky/brittle.
Now it tags the function with help_summary.
Fixed issue with handling commands that provide a custom help_ function. We can now
redirect the output to a string to be formatted with the other commands.
Added some documentation explaining the new help categories.
Updated unit tests.
|
|
|
|
|
|
|
|
| |
function provided.
In verbose help, added check for argparse usage block (starting with 'usage: '), to skip that block and move to the next comment block
Added unit tests for new categorization code
Updated example to demonstrate skipping of argparse usage statement
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Updated unit tests due to changes in how help is output for commands decorated with an argparse ArgumentParser.
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
| |
a -a/--all option to the set command
|
|
|
|
|
|
| |
It's functionality has been moved inside the set command.
The set command now uses an argparse parser.
|
| |
|
| |
|
| |
|
|
|
|
| |
This is so that non-essential info which isn't directly associated with command output, such as time elapsed while executing a command, won't redirect when command output is redirected using >, >>, or |.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
Load and relative load now require a file path
Edit will use a temporary file by default and delete it when done
Save will use a temporary file by default and inform the user what it is
Also changed the default value for autorun_on_edit to False so that it can safely be used as an actual file editor.
|
|
|
|
|
|
|
|
| |
This command is explicitly for running Python script files within an embedded Python interpreter.
The advantages over the py command with "run" are:
- Tab-completion of file system paths is supported
- Command-line arguments can be passed to the Python script
|
|
|
|
|
|
|
|
| |
The extra functionality of listing a span (slice) of history items present in the list command has been incorporated into the existing history command and the list command has been removed.
Unit tests have been updated accordingly.
In the process a bug was fixed that was causing a crash if and end was supplied to the span but not a start.
|
|
|
|
|
|
|
|
| |
Added a list of commands to explicitly exclude displaying in the help menu of commands which detailed help can be retrieved for.
By default, only "do_eof" is in this list since that isn't a command which is ever intended for an end user to directly enter on the command line.
Also updated unit tests to reflect new default help menu.
|