mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02:00
Pretty-print values in the REPL
Pretty-print values in the REPL by printing each item in a list or attrset on a separate line. When possible, single-item lists and attrsets are printed on one line, as long as they don't contain a nested list, attrset, or thunk. Before: ``` { attrs = { a = { b = { c = { }; }; }; }; list = [ 1 ]; list' = [ 1 2 3 ]; } ``` After: ``` { attrs = { a = { b = { c = { }; }; }; }; list = [ 1 ]; list' = [ 1 2 3 ]; } ```
This commit is contained in:
parent
a31f2cb0cd
commit
c0a15fb7d0
6 changed files with 195 additions and 23 deletions
|
@ -101,7 +101,8 @@ struct NixRepl
|
|||
.ansiColors = true,
|
||||
.force = true,
|
||||
.derivationPaths = true,
|
||||
.maxDepth = maxDepth
|
||||
.maxDepth = maxDepth,
|
||||
.prettyIndent = 2
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue