Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions argv/src/script.rs
Original file line number Diff line number Diff line change
Expand Up @@ -454,10 +454,10 @@ def --env __usage_complete_{ident} [spans: list<string>] {{
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 }} }}
Expand Down
4 changes: 2 additions & 2 deletions go/argv/script.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,10 +324,10 @@ def --env __usage_complete_{ident} [spans: list<string>] {
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 } }
Expand Down