Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH 3/6: handle the Pound token in error message
otherwise we print this:
parse error in ${...\M-D...} substitution
---
In practice, I'm not sure how to hit this path, I uncommented the
condition to test it, so maybe this is overly cautious for no gain?
Src/subst.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Src/subst.c b/Src/subst.c
index 16a3cb055c..690d9344d9 100644
--- a/Src/subst.c
+++ b/Src/subst.c
@@ -3380,7 +3380,7 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int pf_flags,
if (haserr)
shtokenize(s);
} else if (haserr || errflag) {
- zerr("parse error in ${...%c...} substitution", s[-1]);
+ zerr("parse error in ${...%c...} substitution", s[-1] == Pound ? '#' : s[-1]);
return NULL;
}
}
--
2.38.1
Messages sorted by:
Reverse Date,
Date,
Thread,
Author