From b99a7f357d30e110a8f5033fb550e5c8b47e00ea Mon Sep 17 00:00:00 2001 From: Victor Engmark Date: Sun, 27 Sep 2026 10:26:51 +0200 Subject: [PATCH] doc/readme: Clarify and format `:doc` REPL command Co-authored-by: Matt Sturgeon --- doc/README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/README.md b/doc/README.md index 8a4baeb7eb10..45d5283bc515 100644 --- a/doc/README.md +++ b/doc/README.md @@ -21,7 +21,12 @@ This includes getting started guides and onboarding guides for *using* Nixpkgs a Write **guides** task-first: lead with a working example, then explain in prose. Write **reference** as the specification of functions and attributes. -We are actively working to generate reference documentation from the [doc-comments](https://github.com/NixOS/rfcs/blob/master/rfcs/0145-doc-strings.md) present in code, which also lets you view it locally with `:doc` in `nix repl`. +We are actively working to generate reference documentation from the [doc-comments](https://github.com/NixOS/rfcs/blob/master/rfcs/0145-doc-strings.md) present in code, which also lets you view it locally with the `:doc` command in `nix repl`, e.g.: + +``` +nix-repl> :l +nix-repl> :doc lib.mapAttrsToList +``` See [Document structure](#document-structure) for a structural template.