mirror of
https://github.com/nushell/nushell.git
synced 2025-05-28 14:07:08 +02:00
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 ```