Repository: nushell/nushell
File: crates/nu-command/src/filesystem/umv.rs (Rust)

Code before:
                description: "Move many files into a directory.",
                example: "mv *.txt my/subdirectory",
                result: None,
            },
            Example {
                description: r#"Move a file into the "my" directory two levels up in the directory tree."#,
                example: "mv test.txt .../my/",
                result: None,
            },
        ]
    }

    fn search_terms(&self) -> Vec<&str> {
        vec!["move", "file", "files", "coreutils"]
    }

    fn signature(&self) -> nu_protocol::Signature {
        Signature::build("mv")
            .input_output_types(vec![(Type::Nothing, Type::Nothing)])
            .switch("force", "Do not prompt before overwriting.", Some('f'))
            .switch("verbose", "Explain what is being done.", Some('v'))
            .switch("progress", "Display a progress bar.", Some('p'))
            .switch("interactive", "Prompt before overwriting.", Some('i'))
            .switch(
                "update",
                "move and overwrite only when the SOURCE file is newer than the destination file or when the destination file is missing",
                Some('u')
            )
            .switch("no-clobber", "Do not overwrite an existing file.", Some('n'))
            .switch("all", "Move hidden files if '*' is provided.", Some('a'))
            .rest(
                "paths",
                SyntaxShape::OneOf(vec![SyntaxShape::GlobPattern, SyntaxShape::String]),
                "Rename SRC to DST, or move SRC to DIR.",
            )
            .allow_variants_without_examples(true)
            .category(Category::FileSystem)
    }

    fn run(
        &self,
        engine_state: &EngineState,
        stack: &mut Stack,
        call: &Call,
        _input: PipelineData,
    ) -> Result<PipelineData, ShellError> {
        // setup the uutils error translation
        let _ = localized_help_template("mv");

        let interactive = call.has_flag(engine_state, stack, "interactive")?;
        let no_clobber = call.has_flag(engine_state, stack, "no-clobber")?;

Review comment (suggestion):
```suggestion
                "Move and overwrite only when the SOURCE file is newer than the destination file or when the destination file is missing.",
```

Code after:
                description: "Move many files into a directory.",
                example: "mv *.txt my/subdirectory",
                result: None,
            },
            Example {
                description: r#"Move a file into the "my" directory two levels up in the directory tree."#,
                example: "mv test.txt .../my/",
                result: None,
            },
        ]
    }

    fn search_terms(&self) -> Vec<&str> {
        vec!["move", "file", "files", "coreutils"]
    }

    fn signature(&self) -> nu_protocol::Signature {
        Signature::build("mv")
            .input_output_types(vec![(Type::Nothing, Type::Nothing)])
            .switch("force", "Do not prompt before overwriting.", Some('f'))
            .switch("verbose", "Explain what is being done.", Some('v'))
            .switch("progress", "Display a progress bar.", Some('p'))
            .switch("interactive", "Prompt before overwriting.", Some('i'))
            .switch(
                "update",
                "Move and overwrite only when the SOURCE file is newer than the destination file or when the destination file is missing.",
                Some('u')
            )
            .switch("no-clobber", "Do not overwrite an existing file.", Some('n'))
            .switch("all", "Move hidden files if '*' is provided.", Some('a'))
            .rest(
                "paths",
                SyntaxShape::OneOf(vec![SyntaxShape::GlobPattern, SyntaxShape::String]),
                "Rename SRC to DST, or move SRC to DIR.",
            )
            .allow_variants_without_examples(true)
            .category(Category::FileSystem)
    }

    fn run(
        &self,
        engine_state: &EngineState,
        stack: &mut Stack,
        call: &Call,
        _input: PipelineData,
    ) -> Result<PipelineData, ShellError> {
        // setup the uutils error translation
        let _ = localized_help_template("mv");

        let interactive = call.has_flag(engine_state, stack, "interactive")?;
        let no_clobber = call.has_flag(engine_state, stack, "no-clobber")?;