diff --git a/custom-completions/op/op-completions.nu b/custom-completions/op/op-completions.nu index c39e3abb8..492117d0b 100644 --- a/custom-completions/op/op-completions.nu +++ b/custom-completions/op/op-completions.nu @@ -1979,11 +1979,11 @@ def "nu completion duration" [ctx: string] { if ($duration | parse --regex ".*?(\\d+)$" | is-not-empty) { [s m h d w] | each {|e| let label = match $e { - s => "seconds" - m => "minutes" - h => "hours" - d => "days" - w => "weeks" + "s" => "seconds" + "m" => "minutes" + "h" => "hours" + "d" => "days" + "w" => "weeks" } {value: $"($duration)($e)", description: $"+($duration | parse --regex '.*?(?\d+)$' | last | get value | into float) ($label)"} } diff --git a/modules/completion-generator/completion-generator.nu b/modules/completion-generator/completion-generator.nu index 691ecdd3a..b754b90ac 100644 --- a/modules/completion-generator/completion-generator.nu +++ b/modules/completion-generator/completion-generator.nu @@ -16,14 +16,14 @@ export def 'from tree' [ $acc } else { match ($acc.schema | describe -d | get type) { - record => { + "record" => { if $x in $acc.schema { $acc | merge { schema: ($acc.schema | get $x) } } else { $acc } } - list => { + "list" => { let fst = $acc.schema.0? | describe -d | get type if not ($fst in ['list', 'record']) { $acc @@ -50,7 +50,7 @@ export def 'from tree' [ } } match ($menu.schema | describe -d | get type) { - record => { + "record" => { $menu.schema | transpose k v | each {|i| @@ -61,7 +61,7 @@ export def 'from tree' [ } } } - list => { + "list" => { if ($menu.schema.0? | describe -d | get type) == 'record' { $menu.schema | each {|x| {$selector.value: null, $selector.description: null} | merge $x } diff --git a/toolkit.nu b/toolkit.nu index 4a5716c88..4564781bf 100644 --- a/toolkit.nu +++ b/toolkit.nu @@ -72,7 +72,7 @@ export def "lint check" []: path -> int { const current_path = (path self) let diagnostics = match $test_methodology { - ide-check => { + "ide-check" => { nu --ide-check 10 $file | $"[($in)]" | from nuon @@ -80,7 +80,7 @@ export def "lint check" []: path -> int { | select severity message } - import-or-source => { + "import-or-source" => { # If any line in the file starts with `export`, then # we assume it is a module. Otherwise, treat it as source let has_exports = (open $file | $in like '(?m)^export\s')