nu_scripts icon indicating copy to clipboard operation
nu_scripts copied to clipboard

winget-completions.nu with problems?

Open Heart1010 opened this issue 2 years ago • 2 comments

I've tried to use the winget-completions.nu completions in my config

use C:\Users\username\git-completions.nu *

but when I now start nushell I'm getting the following error:

Error: nu::parser::unknown_command

  × Unknown command.
    ╭─[C:\Users\username\winget-completions.nu:11:1]
 11 │ export extern "winget install" [
 12 │     query?: string@"nu-complete winget install name",
    ·                    ────────────────┬────────────────
    ·                                    ╰── unknown command
 13 │     --query(-q): string@"nu-complete winget install name", # The query used to search for a package
    ╰────

https://github.com/nushell/nu_scripts/blob/694701430662f08071cc1b88cb3fa438539c39ea/custom-completions/winget/winget-completions.nu#L11

Heart1010 avatar Sep 28 '23 10:09 Heart1010

The winget completions probably need to be updated. I think it's been a while since anyone has looked at it. Feel free to find out what's wrong and submit a PR. Thanks!

fdncred avatar Sep 28 '23 11:09 fdncred

I'm totally new to nu scripts but only by re-ordering all the def blocks to the top of the file fixed it for me.

Heart1010 avatar Oct 03 '23 07:10 Heart1010

@Heart1010 could you please check if the latest version of nu_scripts fixes this problem for you? (Related PR)

godrja avatar Apr 23 '24 14:04 godrja

@Heart1010 could you please check if the latest version of nu_scripts fixes this problem for you? (Related PR)

Perfect - it's working now! Thanks 👍

Heart1010 avatar Apr 23 '24 14:04 Heart1010