Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fish: also query pname and version for completions #4492

Merged
merged 1 commit into from
Oct 6, 2023

Conversation

a-kenji
Copy link
Contributor

@a-kenji a-kenji commented Sep 22, 2023

Description

Query the pname and version attributes for completion generation, if the name attribute is not available.

Fixes #2813

This is pretty much @stopbystudent's approach from the issue.
I tried using pkgs.lib.getName, but didn't find a good way to integrate it.

Checklist

  • Change is backwards compatible.

  • Code formatted with ./format.

  • Code tested through nix-shell --pure tests -A run.all or nix develop --ignore-environment .#all using Flakes.

  • Test cases updated/added. See example.

  • Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

    See CONTRIBUTING for more information and recent commit messages for examples.

  • If this PR adds a new module

    • Added myself as module maintainer. See example.

Maintainer CC

I couldn't find a meta.maintainers, so:

$ git log --since='2023-01-01' --follow --format='%an <%ae>' -- modules/programs/fish.nix | sort | uniq

@emilazy
@yu-re-ka
@marsam

Query the `pname` and `version` attributes for completion generation,
if the `name` attribute is not available.

Fixes nix-community#2813
@rycee rycee merged commit 31a27e4 into nix-community:master Oct 6, 2023
3 checks passed
@rycee
Copy link
Member

rycee commented Oct 6, 2023

Thanks! I don't know much about fish but this looks reasonable to me so I merged to master now 🙂

@a-kenji a-kenji deleted the fish/completion branch October 7, 2023 05:46
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.

Fish completions fail for missing attribute 'name'
2 participants