nushell/docs/commands/register.md
Justin Ma 0d82d7df60
Update documents for commands (#4796)
* Update documents of commands

* Change plugin names for register command examples

* Remove unused docs [ci skip]
2022-03-09 08:05:35 -05:00

31 lines
813 B
Markdown

---
title: register
layout: command
version: 0.59.1
---
Register a plugin
## Signature
```> register (plugin) (signature) --encoding --shell```
## Parameters
- `plugin`: path of executable for plugin
- `signature`: Block with signature description as json object
- `--encoding {string}`: Encoding used to communicate with plugin. Options: [capnp, json]
- `--shell {path}`: path of shell used to run plugin (cmd, sh, python, etc)
## Examples
Register `nu_plugin_query` plugin from ~/.cargo/bin/ dir
```shell
> register -e capnp ~/.cargo/bin/nu_plugin_query
```
Register `nu_plugin_query` plugin from `nu -c`(plugin will be available in that nu session only)
```shell
> let plugin = ((which nu).path.0 | path dirname | path join 'nu_plugin_query'); nu -c $'register -e capnp ($plugin); version'
```