I want to interactively query nix pkgs using the nix-search command provided by nix-search-cli

Not really experiaenced in cli tools any ideas to make this work ?

  • /home/addison
    link
    fedilink
    English
    arrow-up
    2
    ·
    4 months ago

    It looks like you haven’t passed a package name to nix-search, so it’s just printing the usage info, and fzf is ingesting the lines of that usage info for you to fuzzy search over.

    fzf won’t pass the search query back to whatever program piped in the input. The search query is only used to narrow the results.

    I’m not sure how to go about interactively searching nixpkgs with fzf, but you could start by writing a function that accepts a package name or whatever you want to search for and passes it to nix-search. Then fzf can narrow down the results for you.