Skip to content

Fix completions still using 1-based split column names - #1295

Open
qodelicious wants to merge 1 commit into
nushell:mainfrom
qodelicious:fix-split-column-zero-index-completions
Open

qodelicious wants to merge 1 commit into
nushell:mainfrom
qodelicious:fix-split-column-zero-index-completions

Conversation

@qodelicious

Copy link
Copy Markdown
Contributor

Same thing as the modules fix, a few completions still used 1-based split column names.

  • cargo nu-complete cargo packages split workspace_members on spaces and took column1. Newer cargo ids look like path+file:///path/to/foo#0.1.0 with no space, and the name is left out when it matches the folder, so this errored. It now reads packages.name from the same cargo metadata --no-deps output, which only has the workspace members anyway.
  • scoop scoopAliases got an empty string per alias instead of the alias name
  • zellij nu-complete subcommands asked for column2 after splitting on SUBCOMMANDS:, which is column1 now

Tested with stub cargo, scoop and zellij commands on nu 0.116.1. Before, cargo and zellij error and scoop returns ["", ""]. After, they return the package names, [up, rm] and [action, attach, kill-session]. Also checked cargo against a real workspace. toolkit check pr passes.

I left winget alone since #1183 rewrites that file.

split column now names its columns from column0. cargo packages now reads packages.name from cargo metadata, since workspace_members ids no longer have a space separated name.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant