1
Fork 0
mirror of https://github.com/RGBCube/nu_scripts synced 2025-08-02 07:07:46 +00:00

just-completion: "export def" -> "export extern" (#860)

Changing "export def" to "export extern" to not shadow the original
command as it would disallow anything not defined in the re-definition

There seem to be similar cases in completions for (naive search with "rg
'export def'")
- mask
- winget (exports some defs and some externs. So i dont know if those
defs are actually additional functionality)
- pnpm (only exports some 'nu-complete' defs)
- pass (only exports some 'nu-complete' defs)

I don't feel comfortable changing those as i am not familiar with them.
This commit is contained in:
1adept 2024-07-02 19:55:31 +02:00 committed by GitHub
parent 61a805eb06
commit 1f3dc8b98d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 134 additions and 41 deletions

View file

@ -44,13 +44,7 @@ def "nu-complete mask args" [context: string, offset: int] {
$rt
}
export def main [
export extern "mask" [
recipes?: string@"nu-complete mask recipes"
...args: any@"nu-complete mask args"
] {
if ($recipes | is-empty) {
^mask --help
} else {
^mask $recipes $args
}
}
]