vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

commit c58770598b4d0ddd1c33ea0f74199c4ff05eb778
parent 4f702d9a6acebb87ea094a3f1ee21a8475f9fac5
Author: Randy Palamar <palamar@ualberta.ca>
Date:   Tue, 30 May 2023 09:39:02 -0600

allow underscore (_) in command names

fixes #971

Diffstat:
Msam.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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) {