W3cubDocs

/Nushell

extern-wrapped for core

Define a signature for an external command with a custom code block.

Signature

> extern-wrapped {flags} (def_name) (params) (body)

Parameters

  • def_name: definition name
  • params: parameters
  • body: wrapper code block

Input/output types:

input output
nothing nothing

Examples

Define a custom wrapper for an external command

>extern-wrappedmy-echo [...rest] { echo$rest };my-echospam
╭───┬──────╮
0spam
╰───┴──────╯

Notes

This command is a parser keyword. For details, check: https://www.nushell.sh/book/thinking_in_nu.html

Copyright © 2019–2023 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/extern-wrapped.html