mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-01 13:37:48 +00:00
basename: improve error messages
Remove duplicated utility name from error messages
This commit is contained in:
parent
91c736bd95
commit
74802f9f0f
1 changed files with 2 additions and 2 deletions
|
@ -71,7 +71,7 @@ pub fn uumain(args: impl uucore::Args) -> i32 {
|
||||||
if !matches.is_present(options::NAME) {
|
if !matches.is_present(options::NAME) {
|
||||||
crash!(
|
crash!(
|
||||||
1,
|
1,
|
||||||
"{0}: {1}\nTry '{0} --help' for more information.",
|
"{1}\nTry '{0} --help' for more information.",
|
||||||
executable!(),
|
executable!(),
|
||||||
"missing operand"
|
"missing operand"
|
||||||
);
|
);
|
||||||
|
@ -85,7 +85,7 @@ pub fn uumain(args: impl uucore::Args) -> i32 {
|
||||||
if !multiple_paths && matches.occurrences_of(options::NAME) > 2 {
|
if !multiple_paths && matches.occurrences_of(options::NAME) > 2 {
|
||||||
crash!(
|
crash!(
|
||||||
1,
|
1,
|
||||||
"{0}: extra operand '{1}'\nTry '{0} --help' for more information.",
|
"extra operand '{1}'\nTry '{0} --help' for more information.",
|
||||||
executable!(),
|
executable!(),
|
||||||
matches.values_of(options::NAME).unwrap().nth(2).unwrap()
|
matches.values_of(options::NAME).unwrap().nth(2).unwrap()
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue