Просмотр исходного кода

dselect: Improve color-spec --help output

Guillem Jover лет назад: 11
Родитель
Сommit
afdcbb5b21
3 измененных файлов с 14 добавлено и 12 удалено
  1. 1 0
      debian/changelog
  2. 12 11
      dselect/main.cc
  3. 1 1
      man/dselect.1

+ 1 - 0
debian/changelog

@@ -113,6 +113,7 @@ dpkg (1.18.0) UNRELEASED; urgency=low
     Closes: #693951
     Closes: #693951
   * Improve commands listing in «dselect --help» output, by printing them
   * Improve commands listing in «dselect --help» output, by printing them
     before options and listing them one on each line with a description.
     before options and listing them one on each line with a description.
+  * Improve dselect color-spec --help output.
 
 
   [ Raphaël Hertzog ]
   [ Raphaël Hertzog ]
   * Drop myself from Uploaders.
   * Drop myself from Uploaders.

+ 12 - 11
dselect/main.cc

@@ -190,8 +190,8 @@ usage(const struct cmdinfo *ci, const char *value)
 "  --admindir <directory>     Use <directory> instead of %s.\n"
 "  --admindir <directory>     Use <directory> instead of %s.\n"
 "  --expert                   Turn on expert mode.\n"
 "  --expert                   Turn on expert mode.\n"
 "  --debug <file> | -D<file>  Turn on debugging, sending output to <file>.\n"
 "  --debug <file> | -D<file>  Turn on debugging, sending output to <file>.\n"
-"  --colour | --color screenpart:[foreground],[background][:attr[+attr+...]]\n"
-"                             Configure screen colours.\n"
+"  --color <color-spec>       Configure screen colors.\n"
+"  --colour <color-spec>      Ditto.\n"
 "\n"), ADMINDIR);
 "\n"), ADMINDIR);
 
 
   printf(_(
   printf(_(
@@ -199,21 +199,22 @@ usage(const struct cmdinfo *ci, const char *value)
 "  --version                  Show the version.\n"
 "  --version                  Show the version.\n"
 "\n"));
 "\n"));
 
 
+  printf(_("<color-spec> is <screen-part>:[<foreground>],[<background>][:<attr>[+<attr>]...]\n"));
 
 
-  printf(_("Screenparts:\n"));
+  printf(_("<screen-part> is:"));
   for (i=0; screenparttable[i].name; i++)
   for (i=0; screenparttable[i].name; i++)
-    printf("  %s", screenparttable[i].name);
-  fputs("\n\n", stdout);
+    printf(" %s", screenparttable[i].name);
+  fputs("\n", stdout);
 
 
-  printf(_("Colours:\n"));
+  printf(_("<color> is:"));
   for (i=0; colourtable[i].name; i++)
   for (i=0; colourtable[i].name; i++)
-    printf("  %s", colourtable[i].name);
-  fputs("\n\n", stdout);
+    printf(" %s", colourtable[i].name);
+  fputs("\n", stdout);
 
 
-  printf(_("Attributes:\n"));
+  printf(_("<attr> is:"));
   for (i=0; attrtable[i].name; i++)
   for (i=0; attrtable[i].name; i++)
-    printf("  %s", attrtable[i].name);
-  fputs("\n\n", stdout);
+    printf(" %s", attrtable[i].name);
+  fputs("\n", stdout);
 
 
   m_output(stdout, _("<standard output>"));
   m_output(stdout, _("<standard output>"));
 
 

+ 1 - 1
man/dselect.1

@@ -75,7 +75,7 @@ Turn on debugging. Debugging information is sent to \fIfile\fP.
 Turns on expert mode, i.e. doesn't display possibly annoying help
 Turns on expert mode, i.e. doesn't display possibly annoying help
 messages.
 messages.
 .TP
 .TP
-.BR \-\-colour | \-\-color " \fIscreenpart:\fP[\fIforeground\fP],[\fIbackground\fP][\fI:attr\fP[\fI+attr+...\fP]]"
+.BR \-\-colour | \-\-color " \fIscreenpart\fP:[\fIforeground\fP],[\fIbackground\fP][:\fIattr\fP[\fI+attr\fP]...]"
 Configures screen colors. This works only if your display supports colors.
 Configures screen colors. This works only if your display supports colors.
 This option may be used multiple times (and is best used in
 This option may be used multiple times (and is best used in
 \fIdselect.cfg\fP). Each use changes the color (and optionally, other
 \fIdselect.cfg\fP). Each use changes the color (and optionally, other