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

Re: Bug#377765: zsh: completion of configure script does not handle underscore properly



On Tue, Jul 11, 2006 at 04:01:35PM +0900, Ryo IGARASHI wrote:
> When you make a configure option with underscore, completion returns
> without underscore. For example, if you have options like:
> 
>  $ ./configure --help
>  ...snip...
>  Optional Packages:
>    --with-under_score=DIR path to under_score library
>  ...snip...
> 
> Then you get the following completion output:
> 
>  $ ./configure [TAB]
>  --with-underscore   --without-underscore
> 
> I attached the test case for this bug.

This appears to fix that immediate problem.  Is there any downside to
allowing underscores?

Not committing.

Index: Completion/Base/Utility/_arguments
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Base/Utility/_arguments,v
retrieving revision 1.17
diff -u -r1.17 _arguments
--- Completion/Base/Utility/_arguments	27 Sep 2006 16:53:59 -0000	1.17
+++ Completion/Base/Utility/_arguments	7 Oct 2006 09:50:40 -0000
@@ -165,7 +165,7 @@
                     "${${opt%%\=*}//[^a-zA-Z0-9-]}=:${(L)${opt%\]}#*\=}: " )
           done
         else
-          tmpo=("${(@)${(@)tmpo%%\=*}//[^a-z0-9-]}")
+          tmpo=("${(@)${(@)tmpo%%\=*}//[^a-z0-9_-]}")
 
 	  cache=( "$cache[@]" "${(@)^tmpo}=${dir}${descr}" )
         fi



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