From 7c5073628cd52df190a94f797a28ae1b410cdb76 Mon Sep 17 00:00:00 2001 From: amtoine Date: Sun, 19 Nov 2023 16:19:00 +0100 Subject: [PATCH] deprecate `std clip` --- crates/nu-std/std/mod.nu | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/crates/nu-std/std/mod.nu b/crates/nu-std/std/mod.nu index c931817a88..dfc9450977 100644 --- a/crates/nu-std/std/mod.nu +++ b/crates/nu-std/std/mod.nu @@ -144,12 +144,17 @@ export def clip [ --expand (-e) # auto-expand the data given as input --codepage (-c): int # the id of the codepage to use (only on Windows), see https://en.wikipedia.org/wiki/Windows_code_page, e.g. 65001 is for UTF-8 ] { - let input = ( - $in + let input = $in + + print $"Warning: (char -u 26a0) (ansi yellow_bold)deprecated_command(ansi reset)" + print "| the `std clip` command is deprecated and will be removed in Nushell 0.89" + print "" + print $"(ansi cyan)help(ansi reset): please use (ansi {fg: cyan, attr: du})[`nu_plugin_clipboard`]\(https://github.com/FMotalleb/nu_plugin_clipboard\)(ansi reset)" + + let input = $input | if $expand { table --expand } else { table } | into string | if $no_strip {} else { ansi strip } - ) match $nu.os-info.name { "linux" => {