cleo
cleo copied to clipboard
Cleo allows you to create beautiful and testable command-line interfaces.
The docs only have examples for creating multi command applications but there are no examples for creating single command applications. Is there support for this usecase? I mean this: ```...
This is a replication of https://github.com/sdispater/clikit/issues/35, as the faulty code moved from clikit to cleo. The current final test of `StreamOutput._has_color_support` on Windows: https://github.com/sdispater/cleo/blob/7ebf50b4c85e0eca2d9f295588150527c95c84de/cleo/io/outputs/stream_output.py#L141-L147 returns `False` if `ENABLE_VIRTUAL_TERMINAL_PROCESSING` is already...
## Summary Add `choices` parameter to `argument` and `option` functions to accept list of allowed values for an argument or an option. Reject any values that do not match the...
The [docs](https://cleo.readthedocs.io/en/latest/helpers/table.html#table) ([source](https://github.com/sdispater/cleo/blob/0e2e021d0295ec60d28387bda93f4885b83769f7/docs/helpers/table.rst)) mention being to add separator rows to tables (`self.table_separator()`), but the method seems to be entirely missing. [Nothing found about it other than in docs](https://github.com/sdispater/cleo/search?q=TableSeparator&unscoped_q=TableSeparator) in this...
## Summary When we try to render a table that does not fit into a screen width (terminal width) a `ValueError` is thrown. ## What happens In the example below...
The default clikit/cleo application help uses the `c1` style: https://github.com/sdispater/clikit/blob/2d9f4b4ac8cffa3229df1bb5bdd199c58ad72d5d/src/clikit/ui/help/application_help.py#L82-L89 The `c1` style is defined here: https://github.com/sdispater/clikit/blob/5bbf25c69a1f20a9144322a938fb6126414c14e7/src/clikit/formatter/default_style_set.py#L18 Here is an attempt at tweaking [the example from the documentation](https://github.com/sdispater/cleo#usage), but to...
The `completions` command added in https://github.com/sdispater/cleo/commit/c0048bb5ad10af929dd2883a98f74aede5ba6e80 uses a one-level-deep template. There is no room in this template to generate completions for subcommands in a given context, so in general this...
Discovered this trying to work around sdispater/poetry#106 doing something along the lines of `poetry show -v | head -n1 | ..`. Using the `GreetCommand` given in the README: ``` %...
I came across the same problem as described in https://github.com/sdispater/cleo/issues/66#issuecomment-466410466 : the [steps described to create a single command application](https://cleo.readthedocs.io/en/latest/single_command_tool.html) does not work. Example provided in the comment. Also does...
Is it possible to send cleo Command info, error, etc. messages to to stderr?