Skip to content

Commit 7610028

Browse files
committed
🐛 fix more parser issues
1 parent 034ab76 commit 7610028

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

custom-completions/auto-generate/parse-fish.nu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def pair-args [] {
6060
{$"($pair.0 | str trim -c '-')": ($pair.1 | unquote)} # turn into a [{<flag> :<arg>}] removing quotes
6161
]
6262
}
63-
| reduce { |it, acc| $acc | merge { $it }} # merge the list of records into one big record
63+
| reduce { |it, acc| $acc | merge $it } # merge the list of records into one big record
6464
}
6565

6666
def unquote [] {

custom-completions/op/op-completions.nu

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export extern "op account forget" [
109109
--help(-h) # help for forget
110110
--all # Forget all authenticated accounts.
111111

112-
account?: string: string@"nu completion account" # The account to forget.
112+
account?: string@"nu completion account" # The account to forget.
113113
]
114114

115115
# Manage Connect server instances and tokens in your 1Password account
@@ -2124,7 +2124,7 @@ def "nu completion item" [] {
21242124

21252125
def parse_args_rg [] { "(?<opening_quote>['\"`]?)(?<content>.*?)(?<closing_quote>\\k<opening_quote>)(?<separator>\\s+)" }
21262126

2127-
def "nu completion parse-context" [] string -> {cmd: string, args: list<string>} {
2127+
def "nu completion parse-context" []: string -> record {
21282128
# context strings starts at cursor position
21292129
let ctx = $in + ' ' # add space to end to ensure last part is parsed🙄
21302130
mut parse = $ctx | parse --regex (parse_args_rg)
@@ -2177,7 +2177,7 @@ def "nu completion parse-context" [] string -> {cmd: string, args: list<string>}
21772177
def "nu completion output" [
21782178
ctx: string, # entered command [sub command, args, + options]
21792179
--complete (-c) # if the copletion should have a closing quote and terminating space
2180-
] list<string> -> list<string>, string -> list<string> {
2180+
]: list<string> -> list<string>, string -> list<string> {
21812181

21822182
let output = $in
21832183
let parse = $ctx + ` `

custom-completions/poetry/poetry-completions.nu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def "nu-complete poetry python-versions" []: nothing -> list<string> {
88
# Default package source names
99
#
1010
# The default package source names available to install packages from
11-
def "nu-complete poetry default-package-source-names" []: nothing -> list<string> {
11+
def "nu-complete poetry default-package-source-names" [] nothing -> list<string> {
1212
[pypi test test.pypi.org internal-pypi]
1313
}
1414

make_release/gen-js-ext.nu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ def gen_keywords [] {
33
| where is_extern == false
44
and is_custom == false
55
and category !~ deprecated
6-
and ($it.name | str contains -n ' ')
6+
and not ($it.name | str contains ' ')
77
| get name
88
| str join '|')
99

@@ -43,7 +43,7 @@ def gen_keywords_alphabetically [] {
4343
| where is_extern == false
4444
and is_custom == false
4545
and category !~ deprecated
46-
and ($it.name | str contains -n ' ')
46+
and not ($it.name | str contains ' ')
4747
| get name)
4848

4949
let preamble = '\\b('

modules/cwdhist/mod.nu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def __cwdhist_switching [] {
6464
export def empty-sqlite [] {
6565
# sqlite3 empty.db "VACUUM;"; cat empty.db | gzip | encode base64
6666
'H4sIAAAAAAAAAwsO9MksSVVIyy/KTSxRMGYQYGBkZHBQUGBgYGCEYhhAZhMLGBn0ihbwglgCZOgeBaNgFIyCUTAKRsEoGAWjYBSMglEwCkYBVQAANHgbMAAQAAA='
67-
| decode base64 --binary | gzip -d
67+
| decode base64 | gzip -d
6868
}
6969

7070
export def 'cwd history delete' [cwd] {

0 commit comments

Comments
 (0)