argh / argh / helpers.py

Author Commit Message Labels Comments Date
Andy Mikhailenko avatarAndy Mikhailenko
Added shortcut function `dispatch_commands`.
Andy Mikhailenko avatarAndy Mikhailenko
Improved set_default_command(): if `parser.description` is empty and the function has a docstring, that docstring is used as the parser description.
Andy Mikhailenko avatarAndy Mikhailenko
Added dispatch_command() shortcut function. Added documentation. This finally fixes #6.
Branches
6-default-command
Andy Mikhailenko avatarAndy Mikhailenko
Re #6: added a basic test and the relevant code for a default command for the root parser. It seems that everything is fine but we need to check for conflicts, etc.
Branches
6-default-command
madjar avatarmadjar
Fixed helpers.confirm not working in python3. Fixes #14.
Andy Mikhailenko avatarAndy Mikhailenko
BACKWARDS-INCOMPATIBLE. Added support for Python 3.x. Dropped support for Python ≤ 2.5. Included Benjamin Peterson's library "six" to keep the code clean while Python 2.x/3.x-compatible. Updated documentation.
Andy Mikhailenko avatarAndy Mikhailenko
Removed unused imports.
Andy Mikhailenko avatarAndy Mikhailenko
Fixed silly bug.
Andy Mikhailenko avatarAndy Mikhailenko
Removed the previously deprecated argument "intercept" in the dispatch() helper. Replaced a "magic number" with a constant in the wrap_errors() decorator.
Andy Mikhailenko avatarAndy Mikhailenko
Added decorator wrap_errors(). Improved error wrapping in dispatcher. Added license headers. Bumped version.
Andy Mikhailenko avatarAndy Mikhailenko
Bumped version. Small fixes in the documentation.
mel avatarmel
allow using custom namespace objects:
Andy Mikhailenko avatarAndy Mikhailenko
Added dispatch argument `output_file` (issue #10), deprecated argument `intercept`. Added tests.
mel avatarmel
dispatch(): added 'raw_output' argument that disables whitespace/newline additions to output
Andy Mikhailenko avatarAndy Mikhailenko
Fixed edge case: when no command is specified at all, just display usage info. (We should also somehow support usable command-less cases but I have no idea what they can be like.)
Andy Mikhailenko avatarAndy Mikhailenko
Refactored.
Andy Mikhailenko avatarAndy Mikhailenko
Improved documentation a little bit.
Andy Mikhailenko avatarAndy Mikhailenko
Added patch by Mika Eloranta to subparser commands visible in the main level --help.
Andy Mikhailenko avatarAndy Mikhailenko
Added bash completion for commands. Options are not yet supported. User needs to bind completion to certain script name (to be documented). Tests are provided (for internal API only).
Andy Mikhailenko avatarAndy Mikhailenko
Added support for Python 2.5 (this fixes issue #5).
Andy Mikhailenko avatarAndy Mikhailenko
Added a todo note.
Andy Mikhailenko avatarAndy Mikhailenko
Rearranged the code. Added test for @alias decorator. Removed the previously deprecated decorator @generator.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.