Nix 2.26.3
Nix, the purely functional package manager; unstable internal interfaces
 
Loading...
Searching...
No Matches
nix::AddCompletions Class Referenceabstract

#include <args.hh>

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

Public Types

enum class  Type { Normal , Filenames , Attrs }
 

Public Member Functions

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

Detailed Description

The abstract interface for completions callbacks

The idea is to restrict the callback so it can only add additional completions to the collection, or set the completion type. By making it go through this interface, the callback cannot make any other changes, or even view the completions / completion type that have been set so far.

Member Enumeration Documentation

◆ Type

enum class nix::AddCompletions::Type
strong

The type of completion we are collecting.

Member Function Documentation

◆ add()

virtual void nix::AddCompletions::add ( std::string completion,
std::string description = "" )
pure virtual

Add a single completion to the collection

Implemented in nix::Completions.

◆ setType()

virtual void nix::AddCompletions::setType ( Type type)
pure virtual

Set the type of the completions being collected

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

The documentation for this class was generated from the following file: