diff options
Diffstat (limited to 'src/librc-misc.c')
-rw-r--r-- | src/librc-misc.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/librc-misc.c b/src/librc-misc.c index f527ef11..6436e0b4 100644 --- a/src/librc-misc.c +++ b/src/librc-misc.c @@ -336,10 +336,14 @@ char **rc_get_config (char **list, const char *file) entry = rc_xstrdup (token); - do { - /* Bash variables are usually quoted */ - token = strsep (&p, "\"\'"); - } while ((token) && (strlen (token) == 0)); + /* Preserve shell coloring */ + if (*p == '$') + token = p; + else + do { + /* Bash variables are usually quoted */ + token = strsep (&p, "\"\'"); + } while ((token) && (strlen (token) == 0)); /* Drop a newline if that's all we have */ i = strlen (token) - 1; |