nu_command/platform/clip/
command.rs1use nu_engine::{command_prelude::*, get_full_help};
2
3#[derive(Clone)]
4pub struct ClipCommand;
5
6impl Command for ClipCommand {
7 fn name(&self) -> &str {
8 "clip"
9 }
10
11 fn signature(&self) -> Signature {
12 Signature::build("clip")
13 .input_output_types(vec![(Type::Nothing, Type::Nothing)])
14 .category(Category::System)
15 }
16
17 fn description(&self) -> &str {
18 "Commands for managing the clipboard."
19 }
20
21 fn search_terms(&self) -> Vec<&str> {
22 vec!["copy", "paste", "clipboard"]
23 }
24
25 fn run(
26 &self,
27 engine_state: &EngineState,
28 stack: &mut Stack,
29 call: &Call,
30 _input: PipelineData,
31 ) -> Result<PipelineData, ShellError> {
32 Ok(Value::string(get_full_help(self, engine_state, stack), call.head).into_pipeline_data())
33 }
34}