winget-cli icon indicating copy to clipboard operation
winget-cli copied to clipboard

Package names are being truncated when searching with empty string

Open fernandog opened this issue 3 years ago • 10 comments

Brief description of your issue

Package name are being truncated (notice the "..." ) when you do a search with empty string: winget search " "

image

This issue doesn't happen when you search by part of the name winget search visualstudio

image

Using Powershell x86 with maximized window on both commands

Steps to reproduce

search with empty string: winget search " "

Expected behavior

No truncated package names

Actual behavior

Package names are being truncated

Environment

PS C:\WINDOWS\system32> winget --version
v1.3.2691

Windows 11 22H2

fernandog avatar Oct 17 '22 17:10 fernandog

The output is truncated to fit the terminal width in the CLI. We've got PowerShell modules and cmdlets coming out in the next release which don't truncate the output.

denelon avatar Dec 01 '22 17:12 denelon

https://github.com/microsoft/winget-cli/issues/2842

I didn't search for empty characters or app names with spaces, the command I used was winget list (and viewed at full screen size). In the displayed list of downloaded and installed application results, some application names or IDs are truncated and cannot be viewed completely

dong-lufei avatar Jan 13 '23 07:01 dong-lufei

The output is truncated to fit the terminal width in the CLI. We've got PowerShell modules and cmdlets coming out in the next release which don't truncate the output.

is there a plan when this will be released? I joined the Windows Package Manager Insiders Program but It didnt change. Or wasnt it changed yet? Thanks alot.

Frxhb avatar Jan 17 '23 15:01 Frxhb

A preview version of the PowerShell cmdlets is available via the GitHub release.

denelon avatar Jan 17 '23 17:01 denelon

A preview version of the PowerShell cmdlets is available via the GitHub release.

Thanks, I have installed it. Can you tell me how to format the output of winget search """"now better?

Frxhb avatar Jan 17 '23 18:01 Frxhb

Once the module is available, you can just run Find-WinGetPackage and pull the output you need. The default display in the terminal will still show truncated values, but the object contains the names.

denelon avatar Jan 17 '23 19:01 denelon

[Policy] Area-Output

Trenly avatar Jun 16 '23 03:06 Trenly

A workaround could be to output the results to file, and then review the file:

The default is truncated:

PS> winget list Microsoft.VisualStudio.2019
Name                                Id                                    Version  Available Source
---------------------------------------------------------------------------------------------------
Visual Studio Build Tools 2019      Microsoft.VisualStudio.2019.BuildToo… 16.11.28 16.11.29  winget

I use:

PS> winget list Microsoft.VisualStudio.2019 > foo.txt
PS> cat .\foo.txt

Name                                Id                                       Version  Available Source
------------------------------------------------------------------------------------------------------
Visual Studio Build Tools 2019      Microsoft.VisualStudio.2019.BuildTools   16.11.28 16.11.29  winget

RockstarSven avatar Aug 09 '23 11:08 RockstarSven