Skip to content

lmctl login to choose a default name for the environment instead of the static string default #188

@dvaccarosenna

Description

@dvaccarosenna

Currently any login command calls without the --name option will use the value of 'default' as the name of the environment.

Running login for a subsequent environment will attempt to use the same name and ask the user if they want to overwrite it.

Alternatively a user must specify --name to give their environment a unique name.

Potential issues with this:

  • default isn't the best name. It isn't the default environment when more than one environments are available (that's decided by the active_environment)
  • a default values makes sense when you want to log in to an environment quickly. It also makes sense if you only ever plan to log into one environment. However, after logging into a second environment, the use of default for the first is probably not what the user wants to differentiate between them

Suggested change:
Use a default based on the environment parameters, including the hostname and potentially the user/client

E.g.

lmctl login lm.example.com --username dan

result: dan@lm.example.com
lmctl login lm.example.com --client-id MyClient

result: MyClient@lm.example.com

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions