Ejemplo n.º 1
0
    C_LEFT, C_RIGHT, C_END, C_RESET, C_NORM, C_FILE, C_DIR, C_LINK,
    C_FIFO, C_SOCK,
    C_BLK, C_CHR, C_MISSING, C_ORPHAN, C_EXEC, C_DOOR, C_SETUID, C_SETGID,
    C_STICKY, C_OTHER_WRITABLE, C_STICKY_OTHER_WRITABLE, C_CAP, C_MULTIHARDLINK,
    C_CLR_TO_EOL
};

struct bin_str
{
    size_t len;			/* Number of bytes */
    const char *string;		/* Pointer to the same */
};

static struct bin_str color_indicator[] =
{
    { LEN_STR_PAIR ("\033[") },		/* lc: Left of color sequence */
    { LEN_STR_PAIR ("m") },			/* rc: Right of color sequence */
    { 0, NULL },					/* ec: End color (replaces lc+no+rc) */
    { LEN_STR_PAIR ("0") },			/* rs: Reset to ordinary colors */
    { 0, NULL },					/* no: Normal */
    { 0, NULL },					/* fi: File: default */
    { LEN_STR_PAIR ("01;34") },		/* di: Directory: bright blue */
    { LEN_STR_PAIR ("01;36") },		/* ln: Symlink: bright cyan */
    { LEN_STR_PAIR ("33") },		/* pi: Pipe: yellow/brown */
    { LEN_STR_PAIR ("01;35") },		/* so: Socket: bright magenta */
    { LEN_STR_PAIR ("01;33") },		/* bd: Block device: bright yellow */
    { LEN_STR_PAIR ("01;33") },		/* cd: Char device: bright yellow */
    { 0, NULL },					/* mi: Missing file: undefined */
    { 0, NULL },					/* or: Orphaned symlink: undefined */
    { LEN_STR_PAIR ("01;32") },		/* ex: Executable: bright green */
    { LEN_STR_PAIR ("01;35") },		/* do: Door: bright magenta */
Ejemplo n.º 2
0
#include "rldefs.h"	// STREQ, savestring
#include "readline.h"
#include "rlprivate.h"
#include "rlshell.h"
#include "xmalloc.h"

#include "colors.h"
#include "parse-colors.h"

#if defined (COLOR_SUPPORT)

static bool get_funky_string (char **dest, const char **src, bool equals_end, size_t *output_count);

struct bin_str _rl_color_indicator[] =
  {
    { LEN_STR_PAIR ("\033[") },         //  lc: Left of color sequence
    { LEN_STR_PAIR ("m") },             //  rc: Right of color sequence
    { 0, NULL },                        //  ec: End color (replaces lc+no+rc)
    { LEN_STR_PAIR ("0") },             //  rs: Reset to ordinary colors
    { 0, NULL },                        //  no: Normal
    { 0, NULL },                        //  fi: File: default
    { LEN_STR_PAIR ("01;34") },         //  di: Directory: bright blue
    { LEN_STR_PAIR ("01;36") },         //  ln: Symlink: bright cyan
    { LEN_STR_PAIR ("33") },            //  pi: Pipe: yellow/brown
    { LEN_STR_PAIR ("01;35") },         //  so: Socket: bright magenta
    { LEN_STR_PAIR ("01;33") },         //  bd: Block device: bright yellow
    { LEN_STR_PAIR ("01;33") },         //  cd: Char device: bright yellow
    { 0, NULL },                        //  mi: Missing file: undefined
    { 0, NULL },                        //  or: Orphaned symlink: undefined
    { LEN_STR_PAIR ("01;32") },         //  ex: Executable: bright green
    { LEN_STR_PAIR ("01;35") },         //  do: Door: bright magenta
Ejemplo n.º 3
0
#include "rldefs.h"
#include "readline.h"
#include "rlprivate.h"
#include "rlshell.h"
#include "xmalloc.h"

#include "colors.h"
#include "parse-colors.h"

#if defined (COLOR_SUPPORT)

static bool get_funky_string (char **dest, const char **src, bool equals_end, size_t *output_count);

struct bin_str _rl_color_indicator[] =
  {
    { LEN_STR_PAIR ("\033[") },         
    { LEN_STR_PAIR ("m") },            
    { 0, NULL },                        
    { LEN_STR_PAIR ("0") },             
    { 0, NULL },                        
    { 0, NULL },                        
    { LEN_STR_PAIR ("01;34") },         
    { LEN_STR_PAIR ("01;36") },         
    { LEN_STR_PAIR ("33") },            
    { LEN_STR_PAIR ("01;35") },         
    { LEN_STR_PAIR ("01;33") },         
    { LEN_STR_PAIR ("01;33") },        
    { 0, NULL },                        
    { 0, NULL },                        
    { LEN_STR_PAIR ("01;32") },         
    { LEN_STR_PAIR ("01;35") },