add a cross platform clip command to the standard library#8695
add a cross platform clip command to the standard library#8695fdncred merged 13 commits intonushell:mainfrom
clip command to the standard library#8695Conversation
This should make the CI typo checker happy.
|
Cool. A few more cases that might be nice to handle (not saying they need to happen in this PR):
I maintain a (very bad) Rust crate that uses some of these tricks: https://github.com/rgwood/clipboard-anywhere |
|
you could also add if it's a mac, use pbcopy. I can give better syntax later. It may be best to use $nu.os-info.name to check the os. |
thanks for the name of the clipboard command, i've added it right away 👌 |
these are very good and sensible ideas ! could we keep them for another PR? |
|
i've added some tests to make sure the CI passes, but what should we do?
|
I'd just add it I think. |
there it is in 6404d0e then 😉 |
|
i had to remove the tests in 6028b98 because of this Can't open display: (null) error... if you have an idea about that 😇 |
|
I'm thinking that can't open display problem may be because the DISPLAY env var isn't set? I think it needs to be something like |
but in a non-graphical environment like this? 😮 i'll try on my test repo to avoid messing around here |
|
mm this looks no good 😞 https://github.com/amtoine/tests/actions/runs/4610784442/jobs/8149672702#step:4:2 |
|
i think it's just that the CI is not a graphical environment and thus |
ya, maybe so. i was just guessing. |
|
|
|
Thanks |
a bit sad the tests did not go well though 🤔 |
The clip command has been introduced to the standard library in nushell/nushell/pull/8695 and has been available since nushell/nushell/pull/8627.
Should close the associated poin in #8311
Description
this PR adds a
clipcommand tostdwhich--no-notify)new additions from 9cd3c95 to ad3e8de
matchstatement for scalabilitymatchthe value of the$nu.os-info.namemacOSwithpbcopyto the list of supported systemsadd simple tests to make surehad to be removed in 6028b98 (see the failing test)clipworks on all main OSes with the CIUser-Facing Changes
users can now access a
clipto copy the output of any pipeline to the system clipboard, on any systemTests + Formatting
After Submitting