Skip to content

Reduce the number of characters needed for specifying which package is being selectedΒ #985

Open
@JordanMartinez

Description

@JordanMartinez

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 and o in -tion)

I propose we make it possible to reduce the number of character used. There are a few ways to do this:

  1. In spago.yaml, add a new field cli-alias in the package section that allows one to use that alias string in addition to the package name. Given a package name uncopyrightable-sesquipedalian-package and an alias lib, both spago install -p uncopyrightable-sesquipedalian-package and spago install -p lib modify the same package's dependencies).
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions