From d897956f922220972c6fd4bdc218b31647d4a4ec Mon Sep 17 00:00:00 2001 From: Randy Palamar Date: Tue, 30 May 2023 09:39:02 -0600 Subject: allow underscore (_) in command names fixes #971 --- sam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sam.c b/sam.c index 181f229..d088e9c 100644 --- a/sam.c +++ b/sam.c @@ -655,7 +655,7 @@ static void parse_argv(const char **s, const char *argv[], size_t maxarg) { static bool valid_cmdname(const char *s) { unsigned char c = (unsigned char)*s; - return c && !isspace(c) && !isdigit(c) && (!ispunct(c) || (c == '-' && valid_cmdname(s+1))); + return c && !isspace(c) && !isdigit(c) && (!ispunct(c) || c == '_' || (c == '-' && valid_cmdname(s+1))); } static char *parse_cmdname(const char **s) { -- cgit v1.2.3