Skip to content

Commit 43c3259

Browse files
authored
update generate-patterns.nu for new nu syntax
1 parent 73f8ebf commit 43c3259

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

generate-patterns.nu

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@ def generate-matches [
2929
}
3030
let patterns = (
3131
$nu.scope.commands
32-
|where is_builtin and (not $it.is_extern)
32+
|where is_builtin == true and is_extern == false
3333
|get command
3434
|split column ' ' first-word second-word
3535
|default '' second-word
3636
|uniq
3737
|upsert category {|x|
38-
let first-letter = ($x.first-word|split chars|get 0)
38+
let first_letter = ($x.first-word|split chars|get 0)
3939
if $x.second-word == '' {
40-
$"($first-letter)"
40+
$"($first_letter)"
4141
} else {
42-
$"($first-letter)_sub"
42+
$"($first_letter)_sub"
4343
}
4444
}
4545
|group-by category

0 commit comments

Comments
 (0)