Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Portabilities issues of the completion



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 }



Messages sorted by: Reverse Date, Date, Thread, Author