An open API service indexing awesome lists of open source software.

https://github.com/fdncred/nu_plugin_run_internal

A nushell plugin to run internal commands
https://github.com/fdncred/nu_plugin_run_internal

nushell nushell-plugin

Last synced: 4 months ago
JSON representation

A nushell plugin to run internal commands

Awesome Lists containing this project

README

          

# nu_plugin_run_internal

This is a [Nushell](https://nushell.sh/) plugin called "run-internal". The idea is to be able to run internal nushell commands.

## Installing

```nushell
> cargo install --path .
```

## Usage

```
Runs internal command.

Usage:
> run-internal

Flags:
-h, --help: Display the help message for this command

Parameters:
command : Internal command to run.

Input/output types:
╭─#─┬─input─┬─output─╮
│ 0 │ any │ any │
╰───┴───────┴────────╯

Examples:
Run an internal command
> run-internal "ls"

Run a pipeline
> run-internal "print (ls | first 5);print (ps | first 5)
```

### Examples
![alt text](examples.png)

### Error from bad command
![alt text](bad_flag_error.png)

### Notes

This is seriously a hack job. Some things are not exposed to plugins so this plugin is essentially creating a new engine_state and stack. Your mileage may vary. PRs welcome!