[Enhancement / Proposal to gem
on the commandline] Change the format output of "gem list"
#5621
Replies: 5 comments
-
"Default" means it's a default gem, this is definitely useful. I agree that a table format is more helpful, I'm happy to change the format, I don't think we need a CLI flag for this. |
Beta Was this translation helpful? Give feedback.
-
That's potentially a breaking change for anyone consuming the output as we do to identify non-default outdated gems. Perhaps there is a better way. |
Beta Was this translation helpful? Give feedback.
-
I don't consider the output of any command "consumable", unless it has a specific |
Beta Was this translation helpful? Give feedback.
-
@deivid-rodriguez @rubyFeedback What should be the output of a table format to display multiple versions of the same gem? |
Beta Was this translation helpful? Give feedback.
-
I guess a comma separated list of versions, like the current output? |
Beta Was this translation helpful? Give feedback.
-
When you currently do issue this:
You get output like that:
First, I think it is confusing that some gems are listed via "default:" and others not. Only the version number should be displayed, but this is an aside.
If you use python pip and do "pip list", you get something similar:
I would like to propose that "gem list" also uses a similar format. That is get rid of the '()' and instead
use a formatted 2D table output that is properly padded.
I would also propose to make this the default.
However had, in the event that people prefer the current output of "gem list" I propose to actually
not change anything, and instead add an additional commandline variant here such as:
This should then be similar to the pip output, perhaps including "Package" and "Version" as header.
Rationale: I believe some users may prefer a padded output that is simpler to parse and read. Right
now if you have lots of gems, it is all a bit messy. I recently had to use python and pip and I found
that this is a tiny bit easier to read and keep track of when using pip.
I am appreciative of anyone having pro/con opinion about this, and as said, I am not actually really
proposing to change the default, but primarily about enabling a similar format style. People
could then alias this such as I do via "geml" being an alias to "gem list". I could change that to
"gem list --format" or whatever other commandline variant is acceptable then.
Beta Was this translation helpful? Give feedback.
All reactions