mirror of https://github.com/sharkdp/fd.git
Small stylistic change
This commit is contained in:
parent
9a34ba6a0c
commit
a9c7696ecc
11
src/app.rs
11
src/app.rs
|
@ -37,7 +37,7 @@ pub fn build_app() -> App<'static, 'static> {
|
||||||
.long_help(helps[name].long)
|
.long_help(helps[name].long)
|
||||||
};
|
};
|
||||||
|
|
||||||
let app = App::new("fd")
|
let mut app = App::new("fd")
|
||||||
.version(crate_version!())
|
.version(crate_version!())
|
||||||
.usage("fd [FLAGS/OPTIONS] [<pattern>] [<path>...]")
|
.usage("fd [FLAGS/OPTIONS] [<pattern>] [<path>...]")
|
||||||
.setting(AppSettings::ColoredHelp)
|
.setting(AppSettings::ColoredHelp)
|
||||||
|
@ -287,16 +287,15 @@ pub fn build_app() -> App<'static, 'static> {
|
||||||
// Make `--one-file-system` available only on Unix and Windows platforms, as per the
|
// Make `--one-file-system` available only on Unix and Windows platforms, as per the
|
||||||
// restrictions on the corresponding option in the `ignore` crate.
|
// restrictions on the corresponding option in the `ignore` crate.
|
||||||
// Provide aliases `mount` and `xdev` for people coming from `find`.
|
// Provide aliases `mount` and `xdev` for people coming from `find`.
|
||||||
// It's not pretty, but I'm unaware of a way to make just part of a builder chain conditional
|
|
||||||
if cfg!(any(unix, windows)) {
|
if cfg!(any(unix, windows)) {
|
||||||
app.arg(
|
app = app.arg(
|
||||||
arg("one-file-system")
|
arg("one-file-system")
|
||||||
.long("one-file-system")
|
.long("one-file-system")
|
||||||
.aliases(&["mount", "xdev"]),
|
.aliases(&["mount", "xdev"]),
|
||||||
)
|
);
|
||||||
} else {
|
|
||||||
app
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
app
|
||||||
}
|
}
|
||||||
|
|
||||||
#[rustfmt::skip]
|
#[rustfmt::skip]
|
||||||
|
|
Loading…
Reference in New Issue