zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@pwstephenson.fsnet.co.uk>
To: zsh-workers@sunsite.auc.dk
Subject: Re: PATCH: regexparse
Date: Tue, 28 Dec 1999 12:01:05 +0000	[thread overview]
Message-ID: <E122vHq-0008QH-00.1999-12-28-11-59-34@cmailg5.svr.pol.co.uk> (raw)
In-Reply-To: "Tanaka Akira"'s message of "25 Dec 1999 20:37:58 +0900." <rsq3dsrxnc9.fsf@crane.jaist.ac.jp>

Tanaka Akira wrote:
> This patch make regexparse to call completion actions even if command
> line is valid.

I'd rather it was called zregexparse if it's to be a builtin, to avoid
clashes and maintain consistency.

Index: Completion/Base/_regex_arguments
===================================================================
RCS file: /home/pws/CVSROOT/projects/zsh/Completion/Base/_regex_arguments,v
retrieving revision 1.3
diff -u -r1.3 _regex_arguments
--- Completion/Base/_regex_arguments	1999/12/28 11:52:37	1.3
+++ Completion/Base/_regex_arguments	1999/12/28 11:53:15
@@ -70,7 +70,7 @@
   "$funcname"' () {
     local _ra_p1 _ra_p2 _ra_left _ra_right _ra_com
     local _ra_actions _ra_line="${(pj:\0:)${(@)words[1,CURRENT - 1]:Q}}"$'\''\0'\''"$PREFIX"
-    regexparse -c _ra_p1 _ra_p2 "$_ra_line" '"${(j: :)${(qqqq)regex[@]}}"'
+    zregexparse -c _ra_p1 _ra_p2 "$_ra_line" '"${(j: :)${(qqqq)regex[@]}}"'
     case "$?" in
     0|2) _message "no more arguments";;
     1) 
Index: Src/Modules/zutil.c
===================================================================
RCS file: /home/pws/CVSROOT/projects/zsh/Src/Modules/zutil.c,v
retrieving revision 1.3
diff -u -r1.3 zutil.c
--- Src/Modules/zutil.c	1999/12/28 11:52:37	1.3
+++ Src/Modules/zutil.c	1999/12/28 11:53:45
@@ -721,7 +721,7 @@
     return 1;
 }
 
-/* Regexparse stuff. */
+/* Zregexparse stuff. */
 
 typedef struct {
     int cutoff;
@@ -1105,7 +1105,7 @@
 }
 
 /*
-  usage: regexparse string regex...
+  usage: zregexparse string regex...
   status:
     0: matched
     1: unmatched (all next state candidates are failed)
@@ -1114,7 +1114,7 @@
 */
 
 static int
-bin_regexparse(char *nam, char **args, char *ops, int func)
+bin_zregexparse(char *nam, char **args, char *ops, int func)
 {
     int oldextendedglob = opts[EXTENDEDGLOB];
     char *var1 = args[0];
@@ -1152,7 +1152,7 @@
 static struct builtin bintab[] = {
     BUILTIN("zstyle", 0, bin_zstyle, 0, -1, 0, NULL, NULL),
     BUILTIN("zformat", 0, bin_zformat, 3, -1, 0, NULL, NULL),
-    BUILTIN("regexparse", 0, bin_regexparse, 3, -1, 0, "c", NULL),
+    BUILTIN("zregexparse", 0, bin_zregexparse, 3, -1, 0, "c", NULL),
 };
 
 
-- 
Peter Stephenson <pws@pwstephenson.fsnet.co.uk>


  reply	other threads:[~1999-12-28 11:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-12-25  0:41 Tanaka Akira
1999-12-25 11:37 ` Tanaka Akira
1999-12-28 12:01   ` Peter Stephenson [this message]
1999-12-29 13:13 ` Tanaka Akira

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E122vHq-0008QH-00.1999-12-28-11-59-34@cmailg5.svr.pol.co.uk \
    --to=pws@pwstephenson.fsnet.co.uk \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).