about summary refs log tree commit diff
path: root/Src/prompt.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-02-15 23:59:05 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-02-15 23:59:05 +0000
commit7da98c51246f245cde16cddb9b418afcfb3b3574 (patch)
treef51933a73efe9bce68907df66827f23f413569bc /Src/prompt.c
parentac0756270c583430fa036403ac4a726716e1c967 (diff)
downloadzsh-7da98c51246f245cde16cddb9b418afcfb3b3574.tar.gz
zsh-7da98c51246f245cde16cddb9b418afcfb3b3574.tar.xz
zsh-7da98c51246f245cde16cddb9b418afcfb3b3574.zip
24556: %G in prompt for glitch characters
Diffstat (limited to 'Src/prompt.c')
-rw-r--r--Src/prompt.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/Src/prompt.c b/Src/prompt.c
index 68a55a3fd..54baf47ed 100644
--- a/Src/prompt.c
+++ b/Src/prompt.c
@@ -473,6 +473,16 @@ putpromptchar(int doprint, int endchar)
 		    *bp++ = Inpar;
 		}
 		break;
+	    case 'G':
+		if (arg > 0) {
+		    addbufspc(arg);
+		    while (arg--)
+			*bp++ = Nularg;
+		} else {
+		    addbufspc(1);
+		    *bp++ = Nularg;
+		}
+		break;
 	    case /*{*/ '}':
 		if (trunccount && trunccount >= dontcount)
 		    return *fm;