pnp / cli-microsoft365

Manage Microsoft 365 and SharePoint Framework projects on any platform
https://aka.ms/cli-m365
MIT License
901 stars 318 forks source link

Prompt when switching connections #6173

Closed milanholemans closed 1 month ago

milanholemans commented 1 month ago

For a few months, it's possible to store multiple connections in CLI. Users can easily switch between connections using connection use. When I want to switch connections, most of the time I almost know how I named the specific connection I'm looking for. Since I don't know the name exactly, I have to run connection list, copy the name and use this name in connection use. A great improvement would be if we could choose a connection using prompting, just like we do with option sets:

image

I suggest that we make option name optional for connection use. When there are no options specified, we will list all stored connections in the terminal. The user can easily choose a connection by using his up/down keys.

Adam-it commented 1 month ago

I love this idea 👍. Maybe besides name we could show more details about the connection. Like the account/tenant behind it 🤔

Jwaegebaert commented 1 month ago

Maybe besides name we could show more details about the connection. Like the account/tenant behind it

Let’s not make it too complex. If you’re unsure which connection name to use and need to check the tenant, just use the connection list command. Otherwise, it might be too much info and overly complicated.

milanholemans commented 1 month ago

Maybe besides name we could show more details about the connection. Like the account/tenant behind it

Let’s not make it too complex. If you’re unsure which connection name to use and need to check the tenant, just use the connection list command. Otherwise, it might be too much info and overly complicated.

Agree, it's the responsibility of the user to make the connection name clear enough 😊

Adam-it commented 1 month ago

fine then. Lets open it up 👍