Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Portabilities issues of the completion
- X-seq: zsh-workers 8610
- From: Akim Demaille <akim@xxxxxxxx>
- To: Zsh Task Force <zsh-workers@xxxxxxxxxxxxxx>
- Subject: Portabilities issues of the completion
- Date: 10 Nov 1999 18:19:34 +0100
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- Sender: DEMAILLE Akim <akim@xxxxxxxx>
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