mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 19:47:45 +00:00
fix(mkdir) - Add --parent as alias of --parents
It is used this way sometimes: https://sources.debian.org/src/php-symfony-polyfill/1.21.0-2/debian/rules/?hl=49#L49 https://sources.debian.org/src/firebird3.0/3.0.7.33374.ds4-1/debian/functions.sh/?hl=24#L24 https://sources.debian.org/src/postfix/3.5.6-1/debian/configure-instance.sh/?hl=67#L67
This commit is contained in:
parent
718695d541
commit
dbc716546b
2 changed files with 3 additions and 0 deletions
|
@ -50,6 +50,7 @@ pub fn uumain(args: impl uucore::Args) -> i32 {
|
||||||
Arg::with_name(OPT_PARENTS)
|
Arg::with_name(OPT_PARENTS)
|
||||||
.short("p")
|
.short("p")
|
||||||
.long(OPT_PARENTS)
|
.long(OPT_PARENTS)
|
||||||
|
.alias("parent")
|
||||||
.help("make parent directories as needed"),
|
.help("make parent directories as needed"),
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
|
|
|
@ -40,6 +40,8 @@ fn test_mkdir_parent() {
|
||||||
let scene = TestScenario::new(util_name!());
|
let scene = TestScenario::new(util_name!());
|
||||||
scene.ucmd().arg("-p").arg(TEST_DIR4).succeeds();
|
scene.ucmd().arg("-p").arg(TEST_DIR4).succeeds();
|
||||||
scene.ucmd().arg("-p").arg(TEST_DIR4).succeeds();
|
scene.ucmd().arg("-p").arg(TEST_DIR4).succeeds();
|
||||||
|
scene.ucmd().arg("--parent").arg(TEST_DIR4).succeeds();
|
||||||
|
scene.ucmd().arg("--parents").arg(TEST_DIR4).succeeds();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue