attr category

For core.

Attribute for adding a category to custom commands.

Command Type

built-in

Signature

> attr category {flags} (category)

Parameters

  • category: Category of the custom command.

Input/output types:

input output
nothing string

Examples

Add a category to a custom command.

> # Double numbers
    @category math
    def double []: [number -> number] { $in * 2 }

Ported from nushell/nushell.github.io. Copyright (c) 2021 Nushell Project. MIT License.