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
2 changes: 1 addition & 1 deletion custom-completions/cargo-loco/cargo-loco-completions.nu
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ def columns [
]

if not ($query | is-empty) {
$columns = $columns | filter {
$columns = $columns | where {
$in | str contains --ignore-case $query
}
}
Expand Down
4 changes: 2 additions & 2 deletions custom-completions/flutter/flutter-completions.nu
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def "nu-complete flutter commands" [] {
| into string
| str replace --regex --multiline '(Manage[\s\S]*(?=Flutter SDK))' ''
| lines
| filter { str starts-with " " }
| where { str starts-with " " }
| each { str trim }
| parse "{value} {description}"
| str trim
Expand All @@ -33,7 +33,7 @@ def "nu-complete pub commands" [] {
| into string
| str replace --regex --multiline '(Commands[\s\S]*(?=Available subcommands))' ''
| lines
| filter { str starts-with " " }
| where { str starts-with " " }
| each { str trim }
| parse "{value} {description}"
| str trim
Expand Down
46 changes: 23 additions & 23 deletions custom-completions/gh/gh-completions.nu
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
def "nu-complete gh" [] {
^gh --help
| lines
| filter { str starts-with " " }
| where { str starts-with " " }
| skip 1
| parse "{value}: {description}"
| str trim
Expand All @@ -16,7 +16,7 @@ export extern "gh" [
def "nu-complete gh auth" [] {
^gh auth --help
| lines
| filter { str starts-with " " }
| where { str starts-with " " }
| skip 1
| parse "{value}: {description}"
| str trim
Expand All @@ -43,7 +43,7 @@ export extern "gh browse" [
def "nu-complete gh codespace" [] {
^gh codespace --help
| lines
| filter { str starts-with " " }
| where { str starts-with " " }
| skip 1
| parse "{value}: {description}"
| str trim
Expand All @@ -57,7 +57,7 @@ export extern "gh codespace" [
def "nu-complete gh gist" [] {
^gh gist --help
| lines
| filter { str starts-with " " }
| where { str starts-with " " }
| skip 1
| parse "{value}: {description}"
| str trim
Expand Down Expand Up @@ -129,7 +129,7 @@ export extern "gh gist view" [
def "nu-complete gh issue" [] {
^gh issue --help
| lines
| filter { str starts-with " " }
| where { str starts-with " " }
| skip 1
| parse "{value}: {description}"
| str trim
Expand All @@ -144,7 +144,7 @@ export extern "gh issue" [
def "nu-complete gh org" [] {
^gh org --help
| lines
| filter { str starts-with " " }
| where { str starts-with " " }
| skip 1
| parse "{value}: {description}"
| str trim
Expand All @@ -156,7 +156,7 @@ export extern "gh org" [
]

def "nu-complete gh pr" [] {
^gh pr --help | lines | filter { str starts-with " " } | skip 1 | parse "{value}: {description}" | str trim
^gh pr --help | lines | where { str starts-with " " } | skip 1 | parse "{value}: {description}" | str trim
}

export extern "gh pr" [
Expand All @@ -182,7 +182,7 @@ export extern "gh pr checkout" [
def "nu-complete gh project" [] {
^gh project --help
| lines
| filter { str starts-with " " }
| where { str starts-with " " }
| skip 1
| parse "{value}: {description}"
| str trim
Expand All @@ -196,7 +196,7 @@ export extern "gh project" [
def "nu-complete gh release" [] {
^gh release --help
| lines
| filter { str starts-with " " }
| where { str starts-with " " }
| skip 1
| parse "{value}: {description}"
| str trim
Expand All @@ -211,7 +211,7 @@ export extern "gh release" [
def "nu-complete gh repo" [] {
^gh repo --help
| lines
| filter { str starts-with " " }
| where { str starts-with " " }
| skip 1
| parse "{value}: {description}"
| str trim
Expand Down Expand Up @@ -310,7 +310,7 @@ export extern "gh repo fork" [
def "nu-complete gh cache" [] {
^gh cache --help
| lines
| filter { str starts-with " " }
| where { str starts-with " " }
| skip 1
| parse "{value}: {description}"
| str trim
Expand All @@ -325,7 +325,7 @@ export extern "gh cache" [
def "nu-complete gh run" [] {
^gh run --help
| lines
| filter { str starts-with " " }
| where { str starts-with " " }
| skip 1
| parse "{value}: {description}"
| str trim
Expand All @@ -339,7 +339,7 @@ export extern "gh run" [
def "nu-complete gh workflow" [] {
^gh workflow --help
| lines
| filter { str starts-with " " }
| where { str starts-with " " }
| skip 1
| parse "{value}: {description}"
| str trim
Expand All @@ -354,7 +354,7 @@ export extern "gh workflow" [
def "nu-complete gh alias" [] {
^gh alias --help
| lines
| filter { str starts-with " " }
| where { str starts-with " " }
| skip 1
| parse "{value}: {description}"
| str trim
Expand Down Expand Up @@ -403,7 +403,7 @@ export extern "gh completion" [
def "nu-complete gh config" [] {
^gh config --help
| lines
| filter { str starts-with " " }
| where { str starts-with " " }
| skip 1
| parse "{value}: {description}"
| str trim
Expand All @@ -417,7 +417,7 @@ export extern "gh config" [
def "nu-complete gh extension" [] {
^gh extension --help
| lines
| filter { str starts-with " " }
| where { str starts-with " " }
| skip 1
| parse "{value}: {description}"
| str trim
Expand All @@ -431,7 +431,7 @@ export extern "gh extension" [
def "nu-complete gh gpg-key" [] {
^gh gpg-key --help
| lines
| filter { str starts-with " " }
| where { str starts-with " " }
| skip 1
| parse "{value}: {description}"
| str trim
Expand All @@ -445,7 +445,7 @@ export extern "gh gpg-key" [
def "nu-complete gh label" [] {
^gh label --help
| lines
| filter { str starts-with " " }
| where { str starts-with " " }
| skip 1
| parse "{value}: {description}"
| str trim
Expand All @@ -460,7 +460,7 @@ export extern "gh label" [
def "nu-complete gh ruleset" [] {
^gh ruleset --help
| lines
| filter { str starts-with " " }
| where { str starts-with " " }
| skip 1
| parse "{value}: {description}"
| str trim
Expand All @@ -475,7 +475,7 @@ export extern "gh ruleset" [
def "nu-complete gh search" [] {
^gh search --help
| lines
| filter { str starts-with " " }
| where { str starts-with " " }
| skip 1
| parse "{value}: {description}"
| str trim
Expand All @@ -501,7 +501,7 @@ export extern "gh search" [
def "nu-complete gh secret" [] {
^gh secret --help
| lines
| filter { str starts-with " " }
| where { str starts-with " " }
| skip 1
| parse "{value}: {description}"
| str trim
Expand All @@ -516,7 +516,7 @@ export extern "gh secret" [
def "nu-complete gh ssh-key" [] {
^gh ssh-key --help
| lines
| filter { str starts-with " " }
| where { str starts-with " " }
| skip 1
| parse "{value}: {description}"
| str trim
Expand All @@ -536,7 +536,7 @@ export extern "gh status" [
def "nu-complete gh variable" [] {
^gh variable --help
| lines
| filter { str starts-with " " }
| where { str starts-with " " }
| skip 1
| parse "{value}: {description}"
| str trim
Expand Down
2 changes: 1 addition & 1 deletion custom-completions/just/just-completions.nu
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def "nu-complete args" [context:string,offset:int] {
def get-just-arg [name:string,position:int] {
let recipes = (
get-recipes
| filter {|r| $r.name == $name }
| where {|r| $r.name == $name }
| get parameters
| flatten)
let len = $recipes | length
Expand Down
2 changes: 1 addition & 1 deletion custom-completions/kw/kw-completions.nu
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def "nu-complete kw configs" [] {
def "nu-complete kw remotes" [] {
^kw remote --list
| lines
| filter {|line| not ($line | str contains " ")}
| where {|line| not ($line | str contains " ")}
}

# The inglorious kernel developer workflow tool
Expand Down
2 changes: 1 addition & 1 deletion custom-completions/lftp/lftp-completions.nu
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ module lftp-completion-utils {
let files = [
'/etc/ssh/ssh_config',
'~/.ssh/config'
] | filter {|file| $file | path exists }
] | where {|file| $file | path exists }


let first_result: record<hosts: list<record<name: string, addr: string>>, includes: list<string>> = $files | par-each {|file|
Expand Down
2 changes: 1 addition & 1 deletion custom-completions/mask/mask-completions.nu
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def "nu-complete mask args" [context: string, offset: int] {
$rt ++= ($c | get named_flags | each {|x|
let v = if not ($x.long | is-empty) { $"`--($x.long)`" } else if not ($x.short | is-empty) { $"`-($x.short)`" } else { $"---($x.name)" }
let a = ["required", "multiple", "takes_value", "validate_as_number"]
| filter {|y| ($x | get $y) == true }
| where {|y| ($x | get $y) == true }
| str join ','
let d = if ($a | is-empty) { $x.description } else { $"($x.description) \(($a))" }
{value: $v , description: $d }
Expand Down
2 changes: 1 addition & 1 deletion custom-completions/pass/nu-complete/mod.nu
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export def "nu-complete pass-directories" [] {
let dir = (pass_completions_directory)
ls ($dir | path join **)
| get name
| filter { |it| not (ls $it | is-empty) }
| where { |it| not (ls $it | is-empty) }
| each {|it| ( $it | path relative-to $dir) }
}

Expand Down
8 changes: 4 additions & 4 deletions custom-completions/rye/rye-completions.nu
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export extern "rye" [
def "nu-complete rye" [] {
^rye --help
| lines
| filter { str starts-with " " }
| where { str starts-with " " }
| each {str trim}
| parse "{value} {description}"
| str trim
Expand Down Expand Up @@ -120,7 +120,7 @@ def "nu-complete rye tools" [] {
^rye tools --help
| lines
| drop 1
| filter { str starts-with " " }
| where { str starts-with " " }
| each {str trim}
| parse "{value} {description}"
| str trim
Expand All @@ -135,7 +135,7 @@ def "nu-complete rye self" [] {
^rye self --help
| lines
| drop 1
| filter { str starts-with " " }
| where { str starts-with " " }
| each {str trim}
| parse "{value} {description}"
| str trim
Expand All @@ -150,7 +150,7 @@ def "nu-complete rye toolchain" [] {
^rye toolchain --help
| lines
| drop 1
| filter { str starts-with " " }
| where { str starts-with " " }
| each {str trim}
| parse "{value} {description}"
| str trim
Expand Down
2 changes: 1 addition & 1 deletion custom-completions/ssh/ssh-completions.nu
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def "nu-complete ssh-host" [] {
let files = [
'/etc/ssh/ssh_config',
'~/.ssh/config'
] | filter {|file| $file | path exists }
] | where {|file| $file | path exists }

use ssh-completion-utils process

Expand Down
2 changes: 1 addition & 1 deletion custom-completions/winget/winget-completions.nu
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ export def "winget list" [
(do $flagify help $help)
]
| flatten
| filter { not ($in | is-empty) })
| where { not ($in | is-empty) })
)

let output = ^winget ...$params
Expand Down
2 changes: 1 addition & 1 deletion modules/completion-generator/completion-generator.nu
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export def 'from tree' [
if not ($fst in ['list', 'record']) {
$acc
} else {
let r = $acc.schema | filter {|i| ($i | get $selector.value) == $x}
let r = $acc.schema | where {|i| ($i | get $selector.value) == $x}
if ($r | is-empty) {
$acc
} else {
Expand Down
2 changes: 1 addition & 1 deletion modules/docker/mod.nu
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export def image-select [name] {
let imgs = (image-list)
let fs = [image tag repo]
for i in 2..0 {
let r = $imgs | filter {|x|
let r = $imgs | where {|x|
$fs | slice 0..$i | all {|y| ($n | get $y) == ($x | get $y) }
}
if ($r | is-not-empty) {
Expand Down
2 changes: 1 addition & 1 deletion modules/git/git.nu
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def "nu-complete git log" [] {
def "nu-complete git branches" [] {
git branch
| lines
| filter {|x| not ($x | str starts-with '*')}
| where {|x| not ($x | str starts-with '*')}
| each {|x| $"($x|str trim)"}
}

Expand Down
2 changes: 1 addition & 1 deletion modules/git/git_branch_cleanup.nu
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def list_merged [

run-external "git" "branch" ...$args
| lines
| filter {|branch|
| where {|branch|
$keep
| all {|pattern|
$branch !~ $'\A($pattern)\z'
Expand Down
Loading
Loading