summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruint <abhinav.prsai@gmail.com>2025-12-14 11:22:16 +0000
committeruint <abhinav.prsai@gmail.com>2025-12-14 11:22:16 +0000
commit9da8f120231bcfd122245896daaed90f020f0af8 (patch)
treebab161c0dbb4d5dfeaa952909e7a9af7a83e7711
parent0cc6c195ecbc8d69e9ef323a2321c522460cfe14 (diff)
fix single quotes split cmd's
forgot to make sure that single quotes also get counted as quotes
-rw-r--r--src/parser.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/parser.c b/src/parser.c
index 36df589..e50db00 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -553,6 +553,8 @@ static char **split_cmd(const char *cmd, int *out_argc)
}
else if (*p == '"')
state = (state == NORMAL) ? IN_QUOTE : NORMAL;
+ else if (*p == '\'')
+ state = (state == NORMAL) ? IN_QUOTE : NORMAL;
else
token[toklen++] = *p;
}