| Crates.io | nu_plugin_explore_ir |
| lib.rs | nu_plugin_explore_ir |
| version | 0.6.0 |
| created_at | 2024-07-24 02:13:27.542124+00 |
| updated_at | 2025-01-08 14:51:56.334633+00 |
| description | a nushell plugin called explore_ir |
| homepage | |
| repository | https://github.com/devyn/nu_plugin_explore_ir |
| max_upload_size | |
| id | 1313587 |
| size | 265,580 |
cargo install nu_plugin_explore_ir
plugin add ~/.cargo/bin/nu_plugin_explore_ir
This is a fancy viewer for internal representation (IR) code in Nushell. Example:
explore ir {
if ($env.HELLO | is-not-empty) {
"Hello, " ++ $env.HELLO ++ "!"
} else {
"Goodbye, " ++ (random uuid) ++ "!"
}
}

Key bindings:
| Key | Effect |
|---|---|
| q | Quit the application. |
| SPACE | Open the inspector, which shows debug info for the instruction. |
| g | Go to a specific instruction by index. |
| ↑ or k | Go to the previous instruction. |
| ↓ or j | Go to the next instruction. |
| [ | Go back after jumping to an instruction's target. |
| ] | Jump into an instruction's target (branch or call decl / block) |
| ESC | Close a dialog box or prompt. |
With the [ and ] keys it is easy to navigate through IR code and jump into blocks referenced by literals, (custom) declarations in call instructions, or branch targets.