Home | History | Annotate | Download | only in posix

Lines Matching defs:color

8 USE_LS(NEWTOY(ls, USE_LS_COLOR("(color):;")USE_LS_Z("Z")"goACFHLRSacdfiklmnpqrstux1[-Cxm1][-Cxml][-Cxmo][-Cxmg][-cu][-ftS][-HL]", TOYFLAG_BIN|TOYFLAG_LOCALE))
45 bool "ls --color"
49 usage: ls --color[=auto]
51 --color device=yellow symlink=turquoise/red dir=blue socket=purple
64 char *color;
282 int color = 0;
284 if (S_ISDIR(mode)) color = 256+34;
285 else if (S_ISLNK(mode)) color = 256+36;
286 else if (S_ISBLK(mode) || S_ISCHR(mode)) color = 256+33;
287 else if (S_ISREG(mode) && (mode&0111)) color = 256+32;
288 else if (S_ISFIFO(mode)) color = 33;
289 else if (S_ISSOCK(mode)) color = 256+35;
291 return color;
390 unsigned curcol, color = 0;
457 color = color_from_mode(st->st_mode);
458 if (color) printf("\033[%d;%dm", color>>8, color&255);
465 if (color) xprintf("\033[0m");
472 if (fstatat(dirfd, sort[next]->symlink, &st2, 0)) color = 256+31;
473 else color = color_from_mode(st2.st_mode);
475 if (color) printf("\033[%d;%dm", color>>8, color&255);
479 if (color) printf("\033[0m");
519 if (TT.color) toys.optflags ^= FLAG_color;