From 8002d01284830f82d30b9ad854ccd83897262bf9 Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Tue, 27 Jan 2026 00:24:10 +0000 Subject: [PATCH] Update cheatsheets --- tldr/nix-instantiate | 30 ++++++++++++++++++++++++++++++ tldr/ptghci | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 tldr/nix-instantiate create mode 100644 tldr/ptghci diff --git a/tldr/nix-instantiate b/tldr/nix-instantiate new file mode 100644 index 00000000..a6cd966e --- /dev/null +++ b/tldr/nix-instantiate @@ -0,0 +1,30 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# nix-instantiate + +> Create store derivations from nix expressions. +> See also: `nix eval`. +> More information: . + +- Instantiate a store derivation from a Nix file: + +`nix-instantiate {{path/to/file.nix}}` + +- Evaluate an expression: + +`nix-instantiate --eval {{[-E|--expr]}} {{expression}}` + +- Evaluate with machine readable output: + +`nix-instantiate --eval --xml {{[-E|--expr]}} {{expression}}` + +- Raw output, output of the function must be a string: + +`nix-instantiate --eval --raw {{[-E|--expr]}} {{expression}}` + +- Evaluate a Nix expression from a specified file: + +`nix-instantiate --eval {{path/to/file.nix}}` diff --git a/tldr/ptghci b/tldr/ptghci new file mode 100644 index 00000000..8498acbe --- /dev/null +++ b/tldr/ptghci @@ -0,0 +1,38 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# ptghci + +> Interactive Haskell REPL with syntax highlighting, multiline editing, and real-time type display. +> See also: `ghci`. +> More information: . + +- Start an interactive session: + +`ptghci` + +- Start an interactive session and load a Haskell file: + +`ptghci {{path/to/file.hs}}` + +- [Interactive] List past commands from the current session: + +`%past` + +- [Interactive] List past commands including previous sessions: + +`%past -n {{number}}` + +- [Interactive] Re-run specific commands from history: + +`%rerun {{3,4-5,p8}}` + +- [Interactive] Search Hoogle for an identifier: + +`%hoogle {{identifier}}` + +- [Interactive] Change the syntax highlighting style: + +`%style {{style_name}}`