Nix 2.26.3
Nix, the purely functional package manager; unstable internal interfaces
 
Loading...
Searching...
No Matches
nix::PrintOptions Struct Reference

#include <print-options.hh>

Public Member Functions

bool shouldPrettyPrint ()
 

Public Attributes

bool ansiColors = false
 
bool force = false
 
bool derivationPaths = false
 
bool trackRepeated = true
 
size_t maxDepth = std::numeric_limits<size_t>::max()
 
size_t maxAttrs = std::numeric_limits<size_t>::max()
 
size_t maxListItems = std::numeric_limits<size_t>::max()
 
size_t maxStringLength = std::numeric_limits<size_t>::max()
 
size_t prettyIndent = 0
 
ErrorPrintBehavior errors = ErrorPrintBehavior::Print
 

Detailed Description

Options for printing Nix values.

Member Function Documentation

◆ shouldPrettyPrint()

bool nix::PrintOptions::shouldPrettyPrint ( )
inline

True if pretty-printing is enabled.

Member Data Documentation

◆ ansiColors

bool nix::PrintOptions::ansiColors = false

If true, output ANSI color sequences.

◆ derivationPaths

bool nix::PrintOptions::derivationPaths = false

If true and force is set, print derivations as «derivation /nix/store/...» instead of as attribute sets.

◆ errors

ErrorPrintBehavior nix::PrintOptions::errors = ErrorPrintBehavior::Print

How to handle errors encountered while printing values.

◆ force

bool nix::PrintOptions::force = false

If true, force values.

◆ maxAttrs

size_t nix::PrintOptions::maxAttrs = std::numeric_limits<size_t>::max()

Maximum number of attributes in attribute sets to print.

Note that this is a limit for the entire print invocation, not for each attribute set encountered.

◆ maxDepth

size_t nix::PrintOptions::maxDepth = std::numeric_limits<size_t>::max()

Maximum depth to evaluate to.

◆ maxListItems

size_t nix::PrintOptions::maxListItems = std::numeric_limits<size_t>::max()

Maximum number of list items to print.

Note that this is a limit for the entire print invocation, not for each list encountered.

◆ maxStringLength

size_t nix::PrintOptions::maxStringLength = std::numeric_limits<size_t>::max()

Maximum string length to print.

◆ prettyIndent

size_t nix::PrintOptions::prettyIndent = 0

Indentation width for pretty-printing.

If set to 0 (the default), values are not pretty-printed.

◆ trackRepeated

bool nix::PrintOptions::trackRepeated = true

If true, track which values have been printed and skip them on subsequent encounters. Useful for self-referential values.


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