Introduce convenience method for get
commands
#1476
Replies: 3 comments 22 replies
-
Interesting observation @waldekmastykarz I think that this would be good default behaviour of a command rather than introducing a specific switch to invoke such behaviour. In the example you gave for
|
Beta Was this translation helpful? Give feedback.
-
Yes definitely makes sense to me, can't really recall any cli implementations doing things like that, so find it hard to compare for 'best practices'. But 👍 from me. |
Beta Was this translation helpful? Give feedback.
-
Agree this could be a nice feature to have, but just a thought though, when there are a large number of "things" to select from, Could there be some simple pre-filtering of the list of "things",
|
Beta Was this translation helpful? Give feedback.
-
Currently, when using
get
commands, you need to specify which item you want to retrieve, either by its URL, ID, name, etc. In some cases you know the identifier upfront, but often you need to run the correspondinglist
command first to get the identifier and then run theget
command with the right ID.What if we could simplify this experience by introducing a convenience mode for
get
commands that would combine thelist
andget
functionality in a single command? For example, imagine you'd runspo site get --interactive
. Since there is no URL specified, thespo site get
command will first retrieve all sites usingspo site list
. Then, it will provide you with a prompt to select the site that you'd like to get. After selecting a site from the list, the CLI would execute thespo site get
command with the selected site.The convenience switch could be triggered either explicitly through a separate option like
--interactive
, or implicitly, when no identifier has been specified in aget
command.What do you think @pnp/office-365-cli-maintainers?
Beta Was this translation helpful? Give feedback.
All reactions