Open
Description
The new spago's CLI allows one to select a package by referring to it via package name. However, this choice is somewhat problematic in a few situations:
- when the package name is long, whether due to multiple parts within the name (e.g.
node-some-special-package-name
) or due to long words within the name (e.g.uncopyrightable-sesquipedalian-package
courtesy of 13 of the Longest Words in the English Language - when the letters used within the package name happen to be a particular sequence of characters that the current user is prone to misspell (e.g. switching
i
ando
in-tion
)
I propose we make it possible to reduce the number of character used. There are a few ways to do this:
- In
spago.yaml
, add a new fieldcli-alias
in thepackage
section that allows one to use that alias string in addition to the package name. Given a package nameuncopyrightable-sesquipedalian-package
and an aliaslib
, bothspago install -p uncopyrightable-sesquipedalian-package
andspago install -p lib
modify the same package's dependencies). - In the CLI, add some sort of fuzzy matching on the package names to guess which package is the selected one.
Of these two, I prefer the first one.