zsh-workers
 help / color / mirror / code / Atom feed
From: Akim Demaille <akim@epita.fr>
To: Zsh Task Force <zsh-workers@sunsite.auc.dk>
Subject: Portabilities issues of the completion
Date: 10 Nov 1999 18:19:34 +0100	[thread overview]
Message-ID: <mv4k8nquuvt.fsf@nostromo.lrde.epita.fr> (raw)


Hi People,

In one word, the regexp (a|) is not portable.  mawk hates, gawk loves.
Completion of make is affected on all the debian systems.

\? is portable.

According to one of the most aesthetic regexp I ever had to write:

share/zsh/functions # egrep '(\(\||\|\))' -- `fgrep awk -il *`   nostromo 18:15
_make:          /^\.include  *<bsd\.port\.(subdir\.|pre\.|)mk>/ || /^\.include  *".*mk\/bsd\.pkg\.(subdir\.|)mk"/ {
_mh:elif [[ "$prev" = -(no|)cc ]]; then
_zftp:  *(get(|at)|gcp|delete|remote))
_zftp:  *(put(|at)|pcp))

Only _make was affected, the others were not awking in the
corresponding section.

Regards,

        Akim

share/zsh/functions # diff -u _make.orig _make                   nostromo 18:16
--- _make.orig  Wed Nov 10 18:13:37 1999
+++ _make       Wed Nov 10 18:14:02 1999
@@ -22,7 +22,7 @@
   [[ -n "$file" ]] &&
     compadd "$expl[@]" - \
       $(awk '/^[a-zA-Z0-9][^\/ \t]+:/ {print $1}
-            /^\.include  *<bsd\.port\.(subdir\.|pre\.|)mk>/ || /^\.include  *".*mk\/bsd\.pkg\.(subdir\.|)mk"/ {
+            /^\.include  *<bsd\.port\.(subdir\.|pre\.)\?mk>/ || /^\.include  *".*mk\/bsd\.pkg\.(subdir\.)\?mk"/ {
               print "fetch fetch-list extract patch configure build install reinstall deinstall package describe checkpatch checksum makesum" }' \
            FS=: $file) && ret=0
   (( ret )) && { compset -P 1 '*\='; _files }


             reply	other threads:[~1999-11-10 17:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-10 17:19 Akim Demaille [this message]
1999-11-10 17:29 Akim Demaille
1999-11-10 19:41 ` 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=mv4k8nquuvt.fsf@nostromo.lrde.epita.fr \
    --to=akim@epita.fr \
    --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).