Index: utils/ofhttp/OFHTTP.m ================================================================== --- utils/ofhttp/OFHTTP.m +++ utils/ofhttp/OFHTTP.m @@ -76,21 +76,31 @@ @"Usage: %@ -[cehHmoOPqv] url1 [url2 ...]\n", [OFApplication programName]]; if (full) [stream writeString: - @"\nOptions:\n" - @" -b Specify the file to send as body\n" - @" -c Continue download of existing file\n" - @" -h Show this help\n" - @" -H Add a header (e.g. X-Foo:Bar)\n" - @" -m Set the method of the HTTP request\n" - @" -o Specify output file name\n" - @" -O Do a HEAD request to detect file name\n" - @" -P Specify SOCKS5 proxy\n" - @" -q Quiet mode (no output, except errors)\n" - @" -v Verbose mode (print headers)\n"]; + @"\nOptions:\n " + @"-b --body " + @" Specify the file to send as body\n " + @"-c --continue " + @" Continue download of existing file\n " + @"-h --help " + @" Show this help\n " + @"-H --header " + @" Add a header (e.g. X-Foo:Bar)\n " + @"-m --method " + @" Set the method of the HTTP request\n " + @"-o --output " + @" Specify output file name\n " + @"-O --detect-filename" + @" Do a HEAD request to detect the file name\n " + @"-P --proxy " + @" Specify SOCKS5 proxy\n " + @"-q --quiet " + @" Quiet mode (no output, except errors)\n " + @"-v --verbose " + @" Verbose mode (print headers)\n"]; [OFApplication terminateWithStatus: status]; } @implementation OFHTTP @@ -292,19 +302,20 @@ if ([_URLs count] < 1) help(of_stderr, false, 1); if (_quiet && _verbose) { - [of_stderr writeFormat: @"%@: -q and -v are mutually " - @"exclusive!\n", + [of_stderr writeFormat: @"%@: -q / --quiet and -v / --verbose " + @"are mutually exclusive!\n", [OFApplication programName]]; [OFApplication terminateWithStatus: 1]; } if (_outputPath != nil && [_URLs count] > 1) { - [of_stderr writeFormat: @"%@: Cannot use -o when more than " - @"one URL has been specified!\n", + [of_stderr writeFormat: @"%@: Cannot use -o / --output when " + @"more than one URL has been " + @"specified!\n", [OFApplication programName]]; [OFApplication terminateWithStatus: 1]; } [self performSelector: @selector(downloadNextURL) Index: utils/ofzip/OFZIP.m ================================================================== --- utils/ofzip/OFZIP.m +++ utils/ofzip/OFZIP.m @@ -66,26 +66,29 @@ [OFApplication programName]]; if (full) [stream writeString: @"\nOptions:\n" - @" -f Force / override files\n" - @" -h Show this help\n" - @" -l List all files in the archive\n" - @" -n Never override files\n" - @" -q Quiet mode (no output, except errors)\n" - @" -v Verbose output for file list\n" - @" -x Extract files\n"]; + @" -f --force Force / override files\n" + @" -h --help Show this help\n" + @" -l --list List all files in the archive\n" + @" -n --no-clober Never override files\n" + @" -q --quiet Quiet mode (no output, except " + @"errors)\n" + @" -v --verbose Verbose output for file list\n" + @" -x --extract Extract files\n"]; [OFApplication terminateWithStatus: status]; } static void -mutuallyExclusiveError(of_unichar_t option1, of_unichar_t option2) +mutuallyExclusiveError(of_unichar_t shortOption1, OFString *longOption1, + of_unichar_t shortOption2, OFString *longOption2) { - [of_stderr writeFormat: @"Error: -%C and -%C are mutually exclusive!\n", - option1, option2]; + [of_stderr writeFormat: + @"Error: -%C / --%@ and -%C / --%@ are mutually exclusive!\n", + shortOption1, longOption1, shortOption2, longOption2]; [OFApplication terminateWithStatus: 1]; } static void setPermissions(OFString *path, OFZIPArchiveEntry *entry) @@ -126,36 +129,41 @@ while ((option = [optionsParser nextOption]) != '\0') { switch (option) { case 'f': if (_override < 0) - mutuallyExclusiveError('f', 'n'); + mutuallyExclusiveError( + 'f', @"force", 'n', @"no-clobber"); _override = 1; break; case 'n': if (_override > 0) - mutuallyExclusiveError('f', 'n'); + mutuallyExclusiveError( + 'f', @"force", 'n', @"no-clobber"); _override = -1; break; case 'v': if (_outputLevel < 0) - mutuallyExclusiveError('v', 'q'); + mutuallyExclusiveError( + 'q', @"quiet", 'v', @"verbose"); _outputLevel++; break; case 'q': if (_outputLevel > 0) - mutuallyExclusiveError('v', 'q'); + mutuallyExclusiveError( + 'q', @"quiet", 'v', @"verbose"); _outputLevel--; break; case 'l': case 'x': if (mode != '\0') - mutuallyExclusiveError('x', 'l'); + mutuallyExclusiveError( + 'l', @"list", 'x', @"extract"); mode = option; break; case 'h': help(of_stdout, true, 0);