jbang
jbang copied to clipboard
jbang catalog list default rendering is "noisy"
currently jbang catalog list looks like this:
jbanghub/apple = Apple cli's
(https://github.com/jbanghub/apple/blob/HEAD/jbang-catalog.json)
jbanghub/eclipse = Eclipse Foundation developed tools
(https://github.com/jbanghub/eclipse/blob/HEAD/jbang-catalog.json)
jbanghub/jvm-profiling-tools = A collection of JVM profiling tools
(https://github.com/jvm-profiling-tools/ap-loader/blob/HEAD/jbang-catalog.json)
jbanghub/sqlline = Shell for issuing SQL to relational databases via JDBC
(https://github.com/jbanghub/sqlline/blob/HEAD/jbang-catalog.json)
maveniverse = https://github.com/maveniverse/jbang-catalog/blob/HEAD/jbang-catalog.json
quarkusio = Subsonic and Subatomic Quarkus cli and plugins
(https://github.com/quarkusio/jbang-catalog/blob/HEAD/jbang-catalog.json)
That is quite hard to read imo; issue is that the length of the catalog name ends up dictating the layout and becomes quite random.
One idea is to have it formatted in sections instead:
*jbanghub/apple*
Apple cli's
https://github.com/jbanghub/apple/blob/HEAD/jbang-catalog.json
jbanghub/eclipse
Eclipse Foundation developed tools
https://github.com/jbanghub/eclipse/blob/HEAD/jbang-catalog.json
jbanghub/jvm-profiling-tools
A collection of JVM profiling tools
https://github.com/jvm-profiling-tools/ap-loader/blob/HEAD/jbang-catalog.json
jbanghub/sqlline
Shell for issuing SQL to relational databases via JDBC
https://github.com/jbanghub/sqlline/blob/HEAD/jbang-catalog.json
maveniverse
https://github.com/maveniverse/jbang-catalog/blob/HEAD/jbang-catalog.json
quarkusio
Subsonic and Subatomic Quarkus cli and plugins
https://github.com/quarkusio/jbang-catalog/blob/HEAD/jbang-catalog.json
Might even opt for the url not being there unless you do --verbose or --show-origin
I agree that your suggested output makes for better reading.
I do wonder how to present the --show-origin though, unless we go for a double indented list:
https://github.com/jbanghub/jbang-catalog/jbang-catalog.json
*jbanghub/apple*
Apple cli's
https://github.com/jbanghub/apple/blob/HEAD/jbang-catalog.json
jbanghub/eclipse
Eclipse Foundation developed tools
https://github.com/jbanghub/eclipse/blob/HEAD/jbang-catalog.json
jbanghub/jvm-profiling-tools
A collection of JVM profiling tools
https://github.com/jvm-profiling-tools/ap-loader/blob/HEAD/jbang-catalog.json
jbanghub/sqlline
Shell for issuing SQL to relational databases via JDBC
https://github.com/jbanghub/sqlline/blob/HEAD/jbang-catalog.json
http://some/other/url
maveniverse
https://github.com/maveniverse/jbang-catalog/blob/HEAD/jbang-catalog.json
quarkusio
Subsonic and Subatomic Quarkus cli and plugins
https://github.com/quarkusio/jbang-catalog/blob/HEAD/jbang-catalog.json
As for removing the URL, I don't think that would be a good idea, it's a bit like if someone types alias or set or env in their shell and they'd only get a list of names. Yes, those commands are all very "noisy" but they're giving important information, it's not just simply a list of available names, it's the value of each of those items that's important, not the alias itself.
Besides in most cases your list would then look like this:
*jbanghub/apple*
jbanghub/eclipse
jbanghub/jvm-profiling-tools
jbanghub/sqlline
maveniverse
quarkusio
Because most aliases never get given descriptions. For us maybe many of those items would have obvious URLs, but for most normal users I don't think they'd even guess what each of those point to.
Might even opt for the url not being there unless you do --verbose or --show-origin
Neither of those seem like good options: --verbose is just... too verbose, you suddenly get a whole bunch of technical "crap" that you're not interested in as a user.
And --show-origin is there for the specific purpose of telling you in which catalog an item can be found and gives information in a different order and format. Having to use that to see an alias' value isn't right IMO.