about summary refs log tree commit diff
path: root/Src/Zle
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-06-26 08:36:42 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-06-26 08:36:42 +0000
commit3ff5a17d8cf0de337e93ffd9e749d54fb4c70e0a (patch)
tree079e6303eeb6ba452afed4f14769d0ce59343189 /Src/Zle
parent470515922c73eaf630d0b2eb561980e1a87150cb (diff)
downloadzsh-3ff5a17d8cf0de337e93ffd9e749d54fb4c70e0a.tar.gz
zsh-3ff5a17d8cf0de337e93ffd9e749d54fb4c70e0a.tar.xz
zsh-3ff5a17d8cf0de337e93ffd9e749d54fb4c70e0a.zip
remove compfmt; a bit of explanation for compfiles and compgroups (12068)
Diffstat (limited to 'Src/Zle')
-rw-r--r--Src/Zle/computil.c45
1 files changed, 0 insertions, 45 deletions
diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c
index c33a2ef2c..9ec338b7b 100644
--- a/Src/Zle/computil.c
+++ b/Src/Zle/computil.c
@@ -3026,50 +3026,6 @@ bin_comptry(char *nam, char **args, char *ops, int func)
     return 0;
 }
 
-static char *
-fmtstr(char *str, char c, char *repl)
-{
-    int len, num, rlen;
-    char *s, *ret, *rp;
-
-    len = strlen(str);
-    rlen = strlen(repl);
-
-    for (num = 0, s = str; *s; s++)
-	if (*s == '%' && s[1] == c)
-	    num++, s++;
-
-    ret = (char *) zhalloc((num * (rlen - 2)) + len + 1);
-
-    for (s = str, rp = ret; *s; s++) {
-	if (*s == '%' && s[1] == c) {
-	    strcpy(rp, repl);
-	    rp += rlen;
-	    s++;
-	} else
-	    *rp++ = *s;
-    }
-    *rp = '\0';
-
-    return ret;
-}
-
-static int
-bin_compfmt(char *nam, char **args, char *ops, int func)
-{
-    char *param = args[0], *str = args[1];
-
-    for (args += 2; *args; args++) {
-	if (args[0][1] != ':') {
-	    zwarnnam(nam, "invalid argument `%s'", args[0], 0);
-	    return 1;
-	}
-	str = fmtstr(str, **args, *args + 2);
-    }
-    setsparam(param, ztrdup(str));
-    return 0;
-}
-
 #define PATH_MAX2 (PATH_MAX * 2)
 
 static LinkList
@@ -3699,7 +3655,6 @@ static struct builtin bintab[] = {
     BUILTIN("compquote", 0, bin_compquote, 1, -1, 0, NULL, NULL),
     BUILTIN("comptags", 0, bin_comptags, 1, -1, 0, NULL, NULL),
     BUILTIN("comptry", 0, bin_comptry, 0, -1, 0, NULL, NULL),
-    BUILTIN("compfmt", 0, bin_compfmt, 2, -1, 0, NULL, NULL),
     BUILTIN("compfiles", 0, bin_compfiles, 1, -1, 0, NULL, NULL),
     BUILTIN("compgroups", 0, bin_compgroups, 1, -1, 0, NULL, NULL),
 };