aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-05-15 13:15:14 -0700
committerKaz Kylheku <kaz@kylheku.com>2022-05-15 13:15:14 -0700
commit0e55b2a0fd5225c810663c62912e5f93d2e63343 (patch)
tree66c12622038395095a71e30fe9bb6982370233e3
parent24fb6be7496bb42612ab01bca6b99fbd99b92f7b (diff)
downloadpw-0e55b2a0fd5225c810663c62912e5f93d2e63343.tar.gz
pw-0e55b2a0fd5225c810663c62912e5f93d2e63343.tar.bz2
pw-0e55b2a0fd5225c810663c62912e5f93d2e63343.zip
Fix regression: :E and :B commands not recognized.
-rw-r--r--pw.19
-rw-r--r--pw.c2
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 == ' ')