if (IS_MENU_SEP(e) && (!e->title || !*e->title))
printf("\n");
else if (IS_MENU_SEP(e)) {
- color_enable(UL_COLOR_BOLD);
+ color_scheme_enable("help-title", UL_COLOR_BOLD);
printf("\n %s\n", _(e->title));
color_disable();
} else
program. For example, you should make DOS partitions with the DOS FDISK
program and Linux partitions with the Linux fdisk or Linux cfdisk programs.
.SH COLORS
-Implicit coloring can be disabled as follows:
-.RS
+Implicit coloring can be disabled by an empty file \fI/etc/terminal-colors.d/fdisk.disable\fR.
-.br
-.BI "touch /etc/terminal-colors.d/fdisk.disable"
-.br
+See
+.BR terminal-colors.d (5)
+for more details about colorization configuration. The logical color names
+supported by
+.B fdisk
+are:
+.TP
+.B header
+The header of the output tables.
+.TP
+.B help-title
+The help section titles.
+.TP
+.B warn
+The warning messages.
+.TP
+.B welcome
+The welcome message.
-.RE
-For more details see
-.BR terminal-colors.d (5).
.SH AUTHORS
.MT kzak@redhat.com
Karel Zak
fputs_info(ask, stdout);
break;
case FDISK_ASKTYPE_WARNX:
- color_fenable(UL_COLOR_RED, stderr);
+ color_scheme_fenable("warn", UL_COLOR_RED, stderr);
fputs(fdisk_ask_print_get_mesg(ask), stderr);
color_fdisable(stderr);
fputc('\n', stderr);
break;
case FDISK_ASKTYPE_WARN:
- color_fenable(UL_COLOR_RED, stderr);
+ color_scheme_fenable("warn", UL_COLOR_RED, stderr);
fputs(fdisk_ask_print_get_mesg(ask), stderr);
errno = fdisk_ask_print_get_errno(ask);
fprintf(stderr, ": %m\n");
char *next = strchr(str, '\n');
if (next && colors_wanted()) {
*next = '\0';
- color_enable(UL_COLOR_BOLD);
+ color_scheme_enable("header", UL_COLOR_BOLD);
fputs(p, stdout);
color_disable();
fputc('\n', stdout);
usage(stderr);
/* Here starts interactive mode, use fdisk_{warn,info,..} functions */
- color_enable(UL_COLOR_GREEN);
+ color_scheme_enable("welcome", UL_COLOR_GREEN);
fdisk_info(cxt, _("Welcome to fdisk (%s)."), PACKAGE_STRING);
color_disable();
fdisk_info(cxt, _("Changes will remain in memory only, until you decide to write them.\n"