[Console] Command list becomes hard to read in certain conditions #21518

Open
iltar opened this Issue Feb 3, 2017 · 3 comments

Projects

None yet

4 participants

@iltar
Contributor
iltar commented Feb 3, 2017
Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no
Symfony version 3.x+ (possibly 2.7+)

I have an application where I have a very long command name and I have a pretty narrow console screen (1920 / 2) because I have it split screen. Whenever I use app/console, it looks like the screenshot I've attached.

This makes it really hard to read the descriptions.

image

@xabbuh xabbuh added the Console label Feb 3, 2017
@iltar iltar changed the title from Console command list becomes hard to read in certain conditions to [Console] Command list becomes hard to read in certain conditions Feb 3, 2017
@javiereguiluz
Member

I can't think of simple solution to this problem. Testing this in the Symfony Demo app, the problem is not that bad, but the long Doctrine command names makes it look worse than it should. But at the moment I can't think of a solution.

Other technologies solve this problem "easily": they use commands named with just 1 short word and they don't display descriptions:

npm-command-listing

@iltar
Contributor
iltar commented Feb 3, 2017

I'm not sure how the current rendering works, but it could be solved using a table as that would auto-wrap properly within a column?

@deltab
deltab commented Feb 10, 2017

Wrapping would work for the second column, but the first column doesn't contain spaces.
Maybe give the first column a max width, and let longer commands overrun but break the line after:

 doctrine
  doctrine:cache:clear-collection-region
                                      Clear a second-level cache collection region.
  doctrine:cache:clear-entity-region  Clear a second-level cache entity region.
  doctrine:cache:clear-metadata       Clears all metadata cache for an entity manager
  doctrine:cache:clear-query          Clears all query cache for an entity manager
  doctrine:cache:clear-query-region   Clear a second-level cache query region.
  doctrine:cache:clear-result         Clears result cache for an entity manager
  doctrine:database:create            Creates the configured database
  doctrine:database:drop              Drops the configured database
  doctrine:database:import            Import SQL file(s) directly to Database.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment