From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21183 invoked from network); 10 Nov 1999 17:17:29 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 10 Nov 1999 17:17:29 -0000 Received: (qmail 21143 invoked by alias); 10 Nov 1999 17:17:19 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8610 Received: (qmail 21136 invoked from network); 10 Nov 1999 17:17:18 -0000 To: Zsh Task Force Subject: Portabilities issues of the completion From: Akim Demaille Date: 10 Nov 1999 18:19:34 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: DEMAILLE Akim 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 */ || /^\.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 */ || /^\.include *".*mk\/bsd\.pkg\.(subdir\.|)mk"/ { + /^\.include */ || /^\.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 }