currently -v / --version shows the version of the tool.
--info does the same but more verbose (and needed for filing bugs here to complete the information in the template
Please remove --v / -v to display the version and use -i / --info instead
Why?
If you have 2 similar packages by tag or name then the table output is

as a user intuitively I would choose --version to pick a specific version of the software from the given output-
Currently there is no documented switch in /? to do this. This is a fresh tool so such a design change is better done earlier than later.
Since the version information is duplicate I see no real reason other than consistency with other tools like Terminal commands to have this.
Please consider this thoughroughly.
Your misunderstanding comes from the difference between command line options for the winget cli and its subcommands. To me this works as expected:
# show winget version
PS> winget -v
PS> winget --version
# pass version option to winget info subcommand
PS> winget show Microsoft.dotnet -v 3.1.301 -e
PS> winget show Microsoft.dotnet --version 3.1.301 --exact
See https://docs.microsoft.com/en-us/windows/package-manager/winget/#use-winget for details.
Thanks for your help!
Infact I misunderstood this because I would not expect that -v or --v can have different functions at different levels of this command
winget -v shows the version
winget install -v picks a version
Let's tag it "interesting". On the other hand:
why we need to specify -e or --exact at all. If we specify a version with install -v or --v this should be sufficient. Do you see a potential issue how specifying a version could still be missing something?
why we need to specify -e or --exact at all. If we specify a version with install -v or --v this should be sufficient. Do you see a potential issue how specifying a version could still be missing something?
That's a known user experience issue. An explanation can be found here: https://github.com/microsoft/winget-cli/issues/450#issuecomment-647384426
The main issue ticket this problem is being tracked with is #292.
@Karl-WE thank you for sharing your perspective. We have had several different views on syntax and usability. Most of the commands are thought of as "top level", or "first level" instructions. As such they have a long form --command or short form -c.
Initially, winget --version was intended to let a user know which version of the tool they were using. Later, we added winget --info to provide that and much more detail on the client and the rest of the environment. There have been some thoughts on automation against the client, and the belief was that retaining the initial command with a single line of output might be more conducive to automation so a user doesn't have to parse all of the extra meta-data in --info. There are also some additional nuances when the user has installed directly from the GitHub releases and the desktop App Installer.
Thanks for the behind the scenes reason. I understand it much better now. Hope the split issue / FR can help for better UX.
Would it be possible to output --info into an array for automation? @denelon
Would it be possible to output --info into an array for automation? @denelon
That's being tracked in #184, #285 and #221.
Does this issue feature fulfills any target anymore, otherwise I would close.
Can we please switch to the same syntax all modern cli tools seem to be going towards for specifying a version?
PS> winget show [email protected] -e
Having to add a -v parameter is just blergh. Deno does it like this for example
@Karl-WE I believe this issue can be closed :-)
@jantari You should post your feedback in #406 instead.
Most helpful comment
That's a known user experience issue. An explanation can be found here: https://github.com/microsoft/winget-cli/issues/450#issuecomment-647384426
The main issue ticket this problem is being tracked with is #292.