1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 19:17:43 +00:00

Merge pull request #3867 from cakebaker/mv_fix_indentation

mv: fix indentation within uu_app()
This commit is contained in:
Sylvestre Ledru 2022-08-22 13:16:54 +02:00 committed by GitHub
commit 212953e06a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -131,73 +131,67 @@ pub fn uu_app<'a>() -> Command<'a> {
.about(ABOUT) .about(ABOUT)
.override_usage(format_usage(USAGE)) .override_usage(format_usage(USAGE))
.infer_long_args(true) .infer_long_args(true)
.arg( .arg(backup_control::arguments::backup())
backup_control::arguments::backup() .arg(backup_control::arguments::backup_no_args())
) .arg(
.arg(
backup_control::arguments::backup_no_args()
)
.arg(
Arg::new(OPT_FORCE) Arg::new(OPT_FORCE)
.short('f') .short('f')
.long(OPT_FORCE) .long(OPT_FORCE)
.help("do not prompt before overwriting") .help("do not prompt before overwriting"),
) )
.arg( .arg(
Arg::new(OPT_INTERACTIVE) Arg::new(OPT_INTERACTIVE)
.short('i') .short('i')
.long(OPT_INTERACTIVE) .long(OPT_INTERACTIVE)
.help("prompt before override") .help("prompt before override"),
) )
.arg( .arg(
Arg::new(OPT_NO_CLOBBER).short('n') Arg::new(OPT_NO_CLOBBER)
.long(OPT_NO_CLOBBER) .short('n')
.help("do not overwrite an existing file") .long(OPT_NO_CLOBBER)
) .help("do not overwrite an existing file"),
.arg( )
.arg(
Arg::new(OPT_STRIP_TRAILING_SLASHES) Arg::new(OPT_STRIP_TRAILING_SLASHES)
.long(OPT_STRIP_TRAILING_SLASHES) .long(OPT_STRIP_TRAILING_SLASHES)
.help("remove any trailing slashes from each SOURCE argument") .help("remove any trailing slashes from each SOURCE argument"),
) )
.arg( .arg(backup_control::arguments::suffix())
backup_control::arguments::suffix() .arg(
) Arg::new(OPT_TARGET_DIRECTORY)
.arg( .short('t')
Arg::new(OPT_TARGET_DIRECTORY) .long(OPT_TARGET_DIRECTORY)
.short('t') .help("move all SOURCE arguments into DIRECTORY")
.long(OPT_TARGET_DIRECTORY) .takes_value(true)
.help("move all SOURCE arguments into DIRECTORY") .value_name("DIRECTORY")
.takes_value(true) .value_hint(clap::ValueHint::DirPath)
.value_name("DIRECTORY") .conflicts_with(OPT_NO_TARGET_DIRECTORY)
.value_hint(clap::ValueHint::DirPath) .allow_invalid_utf8(true),
.conflicts_with(OPT_NO_TARGET_DIRECTORY) )
.allow_invalid_utf8(true) .arg(
)
.arg(
Arg::new(OPT_NO_TARGET_DIRECTORY) Arg::new(OPT_NO_TARGET_DIRECTORY)
.short('T') .short('T')
.long(OPT_NO_TARGET_DIRECTORY) .long(OPT_NO_TARGET_DIRECTORY)
.help("treat DEST as a normal file") .help("treat DEST as a normal file"),
) )
.arg( .arg(Arg::new(OPT_UPDATE).short('u').long(OPT_UPDATE).help(
Arg::new(OPT_UPDATE) "move only when the SOURCE file is newer than the destination file \
.short('u') or when the destination file is missing",
.long(OPT_UPDATE) ))
.help("move only when the SOURCE file is newer than the destination file or when the destination file is missing") .arg(
)
.arg(
Arg::new(OPT_VERBOSE) Arg::new(OPT_VERBOSE)
.short('v') .short('v')
.long(OPT_VERBOSE).help("explain what is being done") .long(OPT_VERBOSE)
) .help("explain what is being done"),
.arg( )
Arg::new(ARG_FILES) .arg(
.multiple_occurrences(true) Arg::new(ARG_FILES)
.takes_value(true) .multiple_occurrences(true)
.min_values(1) .takes_value(true)
.required(true) .min_values(1)
.allow_invalid_utf8(true) .required(true)
.value_hint(clap::ValueHint::AnyPath) .allow_invalid_utf8(true)
.value_hint(clap::ValueHint::AnyPath),
) )
} }