diff --git a/argv/src/script.rs b/argv/src/script.rs index acb6f548e..997fb8124 100644 --- a/argv/src/script.rs +++ b/argv/src/script.rs @@ -454,10 +454,10 @@ def --env __usage_complete_{ident} [spans: list] {{ let commands = (if $wants_commands {{ let prefix = ($spans | last) let insensitive = $nu.os-info.name == "windows" - let match_prefix = if $insensitive {{ $prefix | str downcase }} else {{ $prefix }} + let match_prefix = if $insensitive {{ $prefix | str lowercase }} else {{ $prefix }} which | where {{|row| - let candidate = if $insensitive {{ $row.command | str downcase }} else {{ $row.command }} + let candidate = if $insensitive {{ $row.command | str lowercase }} else {{ $row.command }} $candidate | str starts-with $match_prefix }} | each {{|row| {{ value: $row.command, description: $row.path }} }} diff --git a/go/argv/script.go b/go/argv/script.go index 114c572b9..89e27b9eb 100644 --- a/go/argv/script.go +++ b/go/argv/script.go @@ -324,10 +324,10 @@ def --env __usage_complete_{ident} [spans: list] { let commands = (if $wants_commands { let prefix = ($spans | last) let insensitive = $nu.os-info.name == "windows" - let match_prefix = if $insensitive { $prefix | str downcase } else { $prefix } + let match_prefix = if $insensitive { $prefix | str lowercase } else { $prefix } which | where {|row| - let candidate = if $insensitive { $row.command | str downcase } else { $row.command } + let candidate = if $insensitive { $row.command | str lowercase } else { $row.command } $candidate | str starts-with $match_prefix } | each {|row| { value: $row.command, description: $row.path } }