cabal-cli icon indicating copy to clipboard operation
cabal-cli copied to clipboard

Display the alias name of cabals when in multi-cabal mode

Open narFnarF opened this issue 2 years ago • 1 comments

When using multi-cabal mode, the interface currently display each cabal as their cabal-key (or a short version of it). It makes it hard to distinguish each cabal when joining more than 2.

Suggestion: Display the user selected alias of each cabal instead (or in addition to) their cabal-key.

narFnarF avatar Sep 06 '23 18:09 narFnarF

It looks like cabal aliases don't currently get passed down into cabal-client. If someone wanted to do a fix, I think the steps would look like

  1. Plumb a new opts.cabalAliases param down into Client in cabal-client, passing config.aliases into this from cabal-cli.
  2. Save that arg to this.cabalAliases in the Client constructor.
  3. Plumb any aliases for a cabal down into any CabalDetails that get created as a new opts parameter.
  4. Expose a cabal's aliases as e.g. CabalDetails.getAliases().
  5. Use that new method in neat-screen.js in cabal-cli to render all aliases for that cabal in the info line.

hackergrrl avatar Sep 06 '23 18:09 hackergrrl