Enhance CLI command formatting and fix section name parsing - #184
Enhance CLI command formatting and fix section name parsing#184sadesguy wants to merge 6 commits into
Conversation
|
Hi, again thanks for looking into improving the help doc based on our discussion. I just checked it out, and gave it try. It looks very impressive! Will give it detailed review later today. So far this is my initial feedback:
|
can you elaborate? I’ve created a "—no-color" flag (true by default) with OPSMATE_COLOR env var if users want to use colors |
|
@sadesguy e.g. vs ^ the existing behaviour where there is a |
| @@ -0,0 +1,124 @@ | |||
| from opsmate.tools import ( | |||
There was a problem hiding this comment.
I like the implementation of docker context.
that being said can you raise it in a separate PR to avoid scope creeping (as this irrelevant to the help formatting?
| COPY --from=builder /app/dist/opsmate-*.whl /tmp/dist/ | ||
|
|
||
| RUN pip install --no-cache-dir /tmp/dist/opsmate-*.whl && opsmate version | ||
| RUN --mount=type=cache,target=/root/.cache/pip \ |
| @@ -0,0 +1,530 @@ | |||
| import click | |||
There was a problem hiding this comment.
I gave this a thought. I'm impressed by the format, but have to say I prefer the orthodox name ... description format for the --help option
for example the docker one:
docker ps --help
Usage: docker ps [OPTIONS]
List containers
Aliases:
docker container ls, docker container list, docker container ps, docker ps
Options:
-a, --all Show all containers (default shows just running)
-f, --filter filter Filter output based on conditions provided
--format string Format output using a custom template:
'table': Print output in table format with column headers (default)
'table TEMPLATE': Print output in table format using the given Go template
'json': Print in JSON format
...There was a problem hiding this comment.
I gave this a thought. Have to say I prefer the orthodox
name ... descriptionformat for the--helpoptionfor example the docker one:
docker ps --help Usage: docker ps [OPTIONS] List containers Aliases: docker container ls, docker container list, docker container ps, docker ps Options: -a, --all Show all containers (default shows just running) -f, --filter filter Filter output based on conditions provided --format string Format output using a custom template: 'table': Print output in table format with column headers (default) 'table TEMPLATE': Print output in table format using the given Go template 'json': Print in JSON format ...
Don’t you think it will be a little cramped with all of the description each option has? For me it hits a little on my eyes with all of the text
…er-related problem solving, sloght dockerfile improvement
1050e02 to
bda05d9
Compare
Refactor the CLI command structure to utilize a custom help formatter, improving the display of command help. Fixes issues with section name parsing in the help formatter for better clarity.