summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dircolors.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/dircolors.c b/src/dircolors.c
index 19bdd3335..ace0d78a5 100644
--- a/src/dircolors.c
+++ b/src/dircolors.c
@@ -207,6 +207,13 @@ append_quoted (const char *str)
{
switch (*str)
{
+ case '\'':
+ APPEND_CHAR ('\'');
+ APPEND_CHAR ('\\');
+ APPEND_CHAR ('\'');
+ need_backslash = true;
+ break;
+
case '\\':
case '^':
need_backslash = !need_backslash;