about summary refs log tree commit diff
path: root/Src/Zle/compmatch.c
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-11-08 10:26:20 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-11-08 10:26:20 +0000
commitf9a6f521d6475360bee03808ced1f301983bb700 (patch)
tree6e01b5b9e8b01ca160c211e88a6a451967f39e5d /Src/Zle/compmatch.c
parent623351671b7437dee08763bbdf9d2e8e6505e347 (diff)
downloadzsh-f9a6f521d6475360bee03808ced1f301983bb700.tar.gz
zsh-f9a6f521d6475360bee03808ced1f301983bb700.tar.xz
zsh-f9a6f521d6475360bee03808ced1f301983bb700.zip
zsh-workers/8588
Diffstat (limited to 'Src/Zle/compmatch.c')
-rw-r--r--Src/Zle/compmatch.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/Src/Zle/compmatch.c b/Src/Zle/compmatch.c
index 344aef161..c3b4c9eae 100644
--- a/Src/Zle/compmatch.c
+++ b/Src/Zle/compmatch.c
@@ -33,10 +33,6 @@
 #undef GLOBAL_PROTOTYPES
 #include "compmatch.pro"
 
-/* Convenience macro for calling bslashquote() (formerly quotename()). */
-
-#define quotename(s, e) bslashquote(s, e, instring)
-
 /* This compares two cpattern lists and returns non-zero if they are
  * equal. */
 
@@ -853,9 +849,8 @@ comp_match(char *pfx, char *sfx, char *w, Patprog cp, Cline *clp, int qu,
 	if (!pattry(cp, r))
 	    return NULL;
     
-	r = (qu ? quotename(r, NULL) : dupstring(r));
-	if (qu == 2 && r[0] == '\\' && r[1] == '~')
-	    chuck(r);
+	r = (qu == 2 ? tildequote(r, 0) : multiquote(r, !qu));
+
 	/* We still break it into parts here, trying to build a sensible
 	 * cline list for these matches, too. */
 	w = dupstring(w);
@@ -866,10 +861,7 @@ comp_match(char *pfx, char *sfx, char *w, Patprog cp, Cline *clp, int qu,
 	Cline pli, plil;
 	int mpl, rpl, wl;
 
-	w = (qu ? quotename(w, NULL) : dupstring(w));
-	if (qu == 2 && w[0] == '\\' && w[1] == '~')
-	    chuck(w);
-
+	w = (qu == 2 ? tildequote(w, 0) : multiquote(w, !qu));
 	wl = strlen(w);
 
 	/* Always try to match the prefix. */