Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
nix::Completions Struct Referencefinal

#include <root.hh>

Inheritance diagram for nix::Completions:
nix::AddCompletions

Public Member Functions

void setType (Type type) override
void add (std::string completion, std::string description="") override

Public Attributes

std::set< Completion > completions
Type type = Type::Normal

Additional Inherited Members

Public Types inherited from nix::AddCompletions
enum class  Type { Normal , Filenames , Attrs }

Detailed Description

The concrete implementation of a collection of completions.

This is exposed so that the main entry point can print out the collected completions.

Member Function Documentation

◆ add()

void nix::Completions::add ( std::string completion,
std::string description = "" )
overridevirtual

Add a single completion to the collection

Implements nix::AddCompletions.

◆ setType()

void nix::Completions::setType ( Type type)
overridevirtual

Set the type of the completions being collected

Todo
it should not be possible to change the type after it has been set.

Implements nix::AddCompletions.


The documentation for this struct was generated from the following files:
  • libutil/include/nix/util/args/root.hh
  • libutil/args.cc