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

Re: zstyle example



On 29 Jun, Clint wrote:
> Chip Salzenberg says [ http://bugs.debian.org/199083 ] :
> 
> The zsh man page includes an example of how to control the tab
> completion for 'rm':
> 
> 	zstyle ':completion:*:*:rm:*' file-patterns \
> 		'*.o:object-files' '%p:all-files'
> 
> This example used to work but recently (I believe in 4.0.7-1) it
> broke; it became necessary to replace the %p with *, which seems to
> work, but I'm not sure whether the semantics are identical.

The problem occurs on line 31 of _files which is:
  for i in ${tmp//%p/${${glob:-\*}//:/\\:}}; do

Changing it to:
  for i in ${tmp//\%p/${${glob:-\*}//:/\\:}}; do

allows it to work again but I can't see any good reason why the `%'
should need to be quoted so I assume that this is a bug introduced with
the recent changes to quoting in these substitutions.

Oliver



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