Skip to content

Instantly share code, notes, and snippets.

@fdncred
Last active February 16, 2024 08:16
Show Gist options
  • Save fdncred/06a123bf9aec22a2e34919cc6ce8fc9a to your computer and use it in GitHub Desktop.
Save fdncred/06a123bf9aec22a2e34919cc6ce8fc9a to your computer and use it in GitHub Desktop.
nushell stdin redesign

Nushell stdin redesign

From Ian on Discord

run interactive repl
  nu

execute commands before interactive repl:
  nu -e "commands"

run command string and then exit (noninteractive):
  nu -c "command"

run script (noninteractive):
  nu script [args]

run commands from stdin (noninteractive):
  echo "commands" | nu

pipe input into command string or script (noninteractive):
  echo "input" | nu -c "command"
  echo "input" | nu script [args]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment