Skip to content

Commit 177bcdb

Browse files
authored
fix(winget-completion): update for nu 0.106.0 (#1150)
because of [new changes](https://www.nushell.sh/blog/2025-07-23-nushell_0_106_0.html#parse-unmatched-optional-capture-groups-are-now-null-toc) to `parse`. winget completion throws error. This pr fixes that by providing default value for optional parameters.
1 parent f7af068 commit 177bcdb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

custom-completions/winget/winget-completions.nu

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@ def "nu-complete winget parse table" [lines: any] {
9090
let lengths = {
9191
name: ($header.name | str length),
9292
id: ($header.id | str length),
93-
version: ($header.version | str length),
94-
match: ($header.match | str length),
95-
available: ($header.available | str length),
96-
source: ($header.source | str length)
93+
version: ($header.version | default "" | str length),
94+
match: ($header.match | default "" | str length),
95+
available: ($header.available | default "" | str length),
96+
source: ($header.source | default "" | str length)
9797
}
9898
$lines | skip 2 | each { |it|
9999
let it = ($it | split chars)

0 commit comments

Comments
 (0)