From bd7d8fdde7cbcb5bf19279a6151515c764332145 Mon Sep 17 00:00:00 2001 From: Michael Debertol Date: Tue, 27 Jul 2021 23:54:29 +0200 Subject: [PATCH] sort: remove duplication from usage string The custom usage string does not have to include the "sort\nUsage:" part, because this part is already printed by clap. It prevents the following duplication: USAGE: sort Usage: sort [OPTION]... [FILE].. Now, only the following is printed: USAGE: sort [OPTION]... [FILE]... --- src/uu/sort/src/sort.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/uu/sort/src/sort.rs b/src/uu/sort/src/sort.rs index 55bcdb77b..91365b603 100644 --- a/src/uu/sort/src/sort.rs +++ b/src/uu/sort/src/sort.rs @@ -916,9 +916,7 @@ impl FieldSelector { fn get_usage() -> String { format!( - "{0} -Usage: - {0} [OPTION]... [FILE]... + "{0} [OPTION]... [FILE]... Write the sorted concatenation of all FILE(s) to standard output. Mandatory arguments for long options are mandatory for short options too. With no FILE, or when FILE is -, read standard input.",