mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-08 02:45:53 +00:00
Update cheatsheets
This commit is contained in:
30
tldr/nix-instantiate
Normal file
30
tldr/nix-instantiate
Normal file
@@ -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: <https://nix.dev/manual/nix/latest/command-ref/nix-instantiate.html>.
|
||||
|
||||
- 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}}`
|
||||
38
tldr/ptghci
Normal file
38
tldr/ptghci
Normal file
@@ -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: <https://github.com/litxio/ptghci>.
|
||||
|
||||
- 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}}`
|
||||
Reference in New Issue
Block a user