Skip to content

Instantly share code, notes, and snippets.

@fdncred
Last active April 15, 2024 14:22
Show Gist options
  • Save fdncred/39c6ab77998c7060d1b435741ae015be to your computer and use it in GitHub Desktop.
Save fdncred/39c6ab77998c7060d1b435741ae015be to your computer and use it in GitHub Desktop.
nushell bashisms

Bashisms

What is a bashism

A bashism is a command, operator, or syntax in the repl that most people associate with bash.

What bashisms does Nushell support?

Bang Bang syntax

In reedline we support these bashisms.

  1. !! - Repeat the last command.
  2. !n - Repeat the nth command from your nushell history.
  3. !-n - Repeat the nth command from your last history entry.
  4. !$ - Get the last spatially separated token from the last command in your history.
  5. !term - Repeat the last command match a strings beginning.

How to invoke bang bang syntax

In nushell when you type a bang command, it performs that functionality and places the result in the nushell command line buffer in the repl. It does not execute it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment