Nushell

Nushell uses $env.PROMPT_COMMAND for prompt configuration. The built-in profile provides a starting point:

extensions:
  term:
    profile: nushell

This sets shell: nu, shell-args: ["--no-config-file"], prompt: ">", and ps2: ":::". Since nushell needs additional configuration to disable its banner and shell integration, you’ll typically override shell-args with a -e flag:

extensions:
  term:
    profile: nushell
    shell-args:
      - "--no-config-file"
      - "-e"
      - "`$env.config.show_banner = false; ...`"

Wrap the -e argument in backticks to prevent pandoc from altering the content.

Basic Usage

echo "Hello from Nushell"
Hello from Nushell

Structured Data

[[name, age]; [Alice, 30], [Bob, 25], [Carol, 35]] | where age > 26
╭───┬───────┬─────╮
│ # │ name  │ age │
├───┼───────┼─────┤
│ 0 │ Alice │  30 │
│ 1 │ Carol │  35 │
╰───┴───────┴─────╯

Pipelines

[1 2 3 4 5] | each { |x| $x * $x }
╭───┬────╮
│ 0 │  1 │
│ 1 │  4 │
│ 2 │  9 │
│ 3 │ 16 │
│ 4 │ 25 │
╰───┴────╯

Math

[10 20 30 40 50] | math avg
30