mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
true, false: enable --help and --version
This commit is contained in:
parent
0fec449de3
commit
2e027bf45d
2 changed files with 6 additions and 8 deletions
|
@ -5,15 +5,14 @@
|
||||||
// * For the full copyright and license information, please view the LICENSE
|
// * For the full copyright and license information, please view the LICENSE
|
||||||
// * file that was distributed with this source code.
|
// * file that was distributed with this source code.
|
||||||
|
|
||||||
use clap::{App, AppSettings};
|
use clap::App;
|
||||||
use uucore::executable;
|
use uucore::executable;
|
||||||
|
|
||||||
pub fn uumain(_: impl uucore::Args) -> i32 {
|
pub fn uumain(args: impl uucore::Args) -> i32 {
|
||||||
|
uu_app().get_matches_from(args);
|
||||||
1
|
1
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn uu_app() -> App<'static, 'static> {
|
pub fn uu_app() -> App<'static, 'static> {
|
||||||
App::new(executable!())
|
App::new(executable!())
|
||||||
.setting(AppSettings::DisableHelpFlags)
|
|
||||||
.setting(AppSettings::DisableVersion)
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,15 +5,14 @@
|
||||||
// * For the full copyright and license information, please view the LICENSE
|
// * For the full copyright and license information, please view the LICENSE
|
||||||
// * file that was distributed with this source code.
|
// * file that was distributed with this source code.
|
||||||
|
|
||||||
use clap::{App, AppSettings};
|
use clap::App;
|
||||||
use uucore::executable;
|
use uucore::executable;
|
||||||
|
|
||||||
pub fn uumain(_: impl uucore::Args) -> i32 {
|
pub fn uumain(args: impl uucore::Args) -> i32 {
|
||||||
|
uu_app().get_matches_from(args);
|
||||||
0
|
0
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn uu_app() -> App<'static, 'static> {
|
pub fn uu_app() -> App<'static, 'static> {
|
||||||
App::new(executable!())
|
App::new(executable!())
|
||||||
.setting(AppSettings::DisableHelpFlags)
|
|
||||||
.setting(AppSettings::DisableVersion)
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue