From 6f7d10870ca3834c7d15202d96b10575915964a2 Mon Sep 17 00:00:00 2001 From: Simon Engmann Date: Mon, 30 Dec 2019 22:10:18 +0100 Subject: [PATCH] Add aliases for `--one-file-system` The functionality provided by `--one-file-system` is called `-mount`/`-xdev` under `find`, so provide those aliases as a compromise. --- src/app.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app.rs b/src/app.rs index fa0d95b..2a9be01 100644 --- a/src/app.rs +++ b/src/app.rs @@ -286,9 +286,14 @@ pub fn build_app() -> App<'static, 'static> { // Make `--one-file-system` available only on Unix and Windows platforms, as per the // restrictions on the corresponding option in the `ignore` crate. + // 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!(unix) || cfg!(windows) { - app.arg(arg("one-file-system").long("one-file-system")) + app.arg( + arg("one-file-system") + .long("one-file-system") + .aliases(&["mount", "xdev"]), + ) } else { app }