zsh-workers
 help / color / mirror / code / Atom feed
* _a2ps completion is broken
@ 1999-09-29 10:31 pollux
  0 siblings, 0 replies; only message in thread
From: pollux @ 1999-09-29 10:31 UTC (permalink / raw)
  To: zsh-workers

[please CC-me, I'm off the list]

Hi,

a2ps has changed its `--list=feature' output 
(somewhere between 4.10.4 and 4.12c, I don't know when)
which is used by zsh-3.1.6.pws6/Completion/User/_a2ps.

Besides this output is subject to locales so LC_ALL=C 
should be added (is there any other completion functions 
affected by this ?).  

The following patch should fix both things and still work 
with old a2ps. I would really like to know if there is an
easiest way to make these patterns matching case insensitive.


--- Completion/User/_a2ps.old	Wed Sep 29 11:45:48 1999
+++ Completion/User/_a2ps	Wed Sep 29 11:51:44 1999
@@ -7,17 +7,17 @@
 
   _a2ps_cache_cmd="$words[1]"
 
-  descr=( "${(@)${(f@)$($words[1] --list=features)//
+  descr=( "${(@)${(f@)$(LC_ALL=C $words[1] --list=features)//
  /	}:#}" )
 
   _a2ps_cache_values=(
-      "${descr[(r)Known style sheets*]#*	}"
-      "${descr[(r)Known encodings*]#*	}"
-      "${descr[(r)Known media*]#*	}"
-      "${descr[(r)Known prologues*]#*	}"
+      "${descr[(r)Known [Ss]tyle [Ss]heets*]#*	}"
+      "${descr[(r)Known [Ee]ncodings*]#*	}"
+      "${descr[(r)Known [Mm]edia*]#*	}"
+      "${descr[(r)Known [Pp]rologues*]#*	}"
       "${descr[(r)Known PostScript Printer Descriptions*]#*	}"
-      "${descr[(r)Known output destination*]#*	}"
-      "${descr[(r)Known user options*]#*	}"
+      "${descr[(r)Known [Oo]utput [Dd]estination*]#*	}"
+      "${descr[(r)Known [Uu]ser [Oo]ptions*]#*	}"
       "${descr[(r)Known Variables*]#*	}"
   )
 fi

-- 
Alexandre 'Pollux' Duret-Lutz


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1999-09-29 10:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-09-29 10:31 _a2ps completion is broken pollux

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).