forked from extern/nushell
Should close the associated poin in #8311 # Description this PR adds a `clip` command to `std` which - has error support in case the clipboard system command is not installed - removes any ANSI escape sequences from the input to have a clean copied text - can throw desktop notifications on linux in case of a long pipeline which needs to be copied (can be disabled with `--no-notify`) - echoes the copied data to the output of the terminal (can be disabled with --silent) - has examples and dependencies listed - has "charpage" 65001 (a.k.a. utf-8) support for windows ## new additions from 9cd3c951f to ad3e8de25b33afb99de32da541447e0ca6c310a1 - better OS context error support - use of the `match` statement for scalability - `match` the value of the `$nu.os-info.name` - add `macOS` with `pbcopy` to the list of supported systems - throw an error when the OS is not supported - ~~add simple tests to make sure `clip` works on all main OSes with the CI~~ had to be removed in 6028b984837785b132dfd62eeff2eb87d8eb9ad0 (see [the failing test](https://github.com/nushell/nushell/actions/runs/4610091544/jobs/8148126550?pr=8695#step:6:35)) # User-Facing Changes users can now access a `clip` to copy the output of any pipeline to the system clipboard, on any system # Tests + Formatting ``` $nothing ``` # After Submitting ``` $nothing ```
Nushell core libraries and plugins
These sub-crates form both the foundation for Nu and a set of plugins which extend Nu with additional functionality.
Foundational libraries are split into two kinds of crates:
- Core crates - those crates that work together to build the Nushell language engine
- Support crates - a set of crates that support the engine with additional features like JSON support, ANSI support, and more.
Plugins are likewise also split into two types:
- Core plugins - plugins that provide part of the default experience of Nu, including access to the system properties, processes, and web-connectivity features.
- Extra plugins - these plugins run a wide range of different capabilities like working with different file types, charting, viewing binary data, and more.