Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: %{...%} in explanation strings
- X-seq: zsh-workers 6008
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: PATCH: %{...%} in explanation strings
- Date: Mon, 12 Apr 1999 10:19:03 +0200 (MET DST)
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
I was reminded of this by the discussion about beautifying completion
lists...
Since we can now use `%b' etc. in explanations strings, we probably
should allow `%{...%}', too.
Bye
Sven
diff -u os/Zle/zle_tricky.c Src/Zle/zle_tricky.c
--- os/Zle/zle_tricky.c Thu Apr 1 15:09:24 1999
+++ Src/Zle/zle_tricky.c Wed Apr 7 20:53:22 1999
@@ -7134,6 +7134,15 @@
u = 0; m = 1;
tcout(TCUNDERLINEEND);
break;
+ case '{':
+ for (p++; *p && (*p != '%' || p[1] != '}'); p++, cc++)
+ if (dopr)
+ putc(*p, shout);
+ if (*p)
+ p++;
+ else
+ p--;
+ break;
}
if (m) {
if (b)
diff -u od/Zsh/compctl.yo Doc/Zsh/compctl.yo
--- od/Zsh/compctl.yo Thu Apr 1 15:08:53 1999
+++ Doc/Zsh/compctl.yo Wed Apr 7 20:59:38 1999
@@ -449,7 +449,8 @@
string.
The sequences tt(%B), tt(%b), tt(%S), tt(%s), tt(%U), and tt(%u) specify
-output attributes (bold, standout, and underline) as in prompts.
+output attributes (bold, standout, and underline) and tt(%{...%}) can
+be used to include literal escape sequences as in prompts.
)
item(tt(-Y) var(explanation))(
Identical to tt(-X), except that the var(explanation) first undergoes
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author