Home Explore Blog CI



nushell

commands/docs/attr_category.md
650f2f8d07d2617f783d6098cea3c79a60e4c6e0adfdb7ea0000000300000364
---
title: attr category
categories: |
  core
version: 0.104.0
core: |
  Attribute for adding a category to custom commands.
usage: |
  Attribute for adding a category to custom commands.
editLink: false
contributors: false
---
<!-- This file is automatically generated. Please edit the command in https://github.com/nushell/nushell instead. -->

# `attr category` for [core](/commands/categories/core.md)

<div class='command-title'>Attribute for adding a category to custom commands.</div>

## Signature

```> attr category {flags} (category)```

## Parameters

 -  `category`: Category of the custom command.


## Input/output types:

| input   | output       |
| ------- | ------------ |
| nothing | list\<string\> |
## Examples

Add a category to a custom command
```nu
> # Double numbers
    @category math
    def double []: [number -> number] { $in * 2 }

```

Chunks
1448a2c5 (1st chunk of `commands/docs/attr_category.md`)
Title: attr category: Add Categories to Custom Commands
Summary
The `attr category` command is used to add a category to custom commands in Nushell. It takes a category name as input and outputs a list of strings. This helps in organizing and classifying custom commands for better management.