From 0e55b2a0fd5225c810663c62912e5f93d2e63343 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 15 May 2022 13:15:14 -0700 Subject: Fix regression: :E and :B commands not recognized. --- pw.1 | 9 +++++++-- pw.c | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/pw.1 b/pw.1 index b818c0e..23e50d3 100644 --- a/pw.1 +++ b/pw.1 @@ -580,11 +580,16 @@ direction. First, some general remarks. -The capture of snaphots, driving display refresh, doesn't pause during the +The capture of snapshots, driving display refresh, doesn't pause during the editing of a colon command. If that is desired, the suspend command must be used first. -The name of a colon command consists of lower-case letters. Currently, no +The name of a colon command consists of a combination of one or more +letters +.B a +through +.R z , +upper or lower case. Currently, no command has a name more than one letter long. The command may be followed by an argument, which is separated from the command by exactly one space. If the argument does not begin with a lower-case letter, then the space diff --git a/pw.c b/pw.c index 9802b83..ede4fdb 100644 --- a/pw.c +++ b/pw.c @@ -803,7 +803,7 @@ static execode execute(pwstate *pw, char *cmd, char *resbuf, execode res = exec_failed; char cmdbuf[16]; int cmdlen = 0; - int ntok = sscanf(cmd + 1, "%15[a-z]%n", cmdbuf, &cmdlen); + int ntok = sscanf(cmd + 1, "%15[a-zA-Z]%n", cmdbuf, &cmdlen); char *arg = cmd + 1 + cmdlen; if (*arg == ' ') -- cgit v1.2.3