* Re: Bug#377765: zsh: completion of configure script does not handle underscore properly
[not found] <20060711070135.40826124047@star.phys.s.u-tokyo.ac.jp>
@ 2006-10-07 9:53 ` Clint Adams
2007-03-29 1:20 ` Ryo IGARASHI
0 siblings, 1 reply; 4+ messages in thread
From: Clint Adams @ 2006-10-07 9:53 UTC (permalink / raw)
To: zsh-workers; +Cc: Ryo IGARASHI, 377765-forwarded
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Bug#377765: zsh: completion of configure script does not handle underscore properly
2006-10-07 9:53 ` Bug#377765: zsh: completion of configure script does not handle underscore properly Clint Adams
@ 2007-03-29 1:20 ` Ryo IGARASHI
2007-12-13 19:09 ` Clint Adams
0 siblings, 1 reply; 4+ messages in thread
From: Ryo IGARASHI @ 2007-03-29 1:20 UTC (permalink / raw)
To: zsh-workers, Ryo IGARASHI, 377765-forwarded
Hi,
On 10/7/06, Clint Adams <schizo@debian.org> wrote:
>
> 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
>
The above patch solved my problem and I haven't experienced any
side effect yet.
Well, I am very sorry for the late reply.
--
Ryo IGARASHI
rigarash@gmail.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Bug#377765: zsh: completion of configure script does not handle underscore properly
2007-03-29 1:20 ` Ryo IGARASHI
@ 2007-12-13 19:09 ` Clint Adams
2007-12-13 20:56 ` Peter Stephenson
0 siblings, 1 reply; 4+ messages in thread
From: Clint Adams @ 2007-12-13 19:09 UTC (permalink / raw)
To: Ryo IGARASHI; +Cc: zsh-workers, 377765
On Thu, Mar 29, 2007 at 01:20:08AM +0000, Ryo IGARASHI wrote:
>> --- 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
>>
>
> The above patch solved my problem and I haven't experienced any
> side effect yet.
>
> Well, I am very sorry for the late reply.
This still seems to be an issue and that patch no longer applies to
current _arguments.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Bug#377765: zsh: completion of configure script does not handle underscore properly
2007-12-13 19:09 ` Clint Adams
@ 2007-12-13 20:56 ` Peter Stephenson
0 siblings, 0 replies; 4+ messages in thread
From: Peter Stephenson @ 2007-12-13 20:56 UTC (permalink / raw)
To: zsh-workers, 377765
On Thu, 13 Dec 2007 14:09:09 -0500
Clint Adams <schizo@debian.org> wrote:
> This still seems to be an issue and that patch no longer applies to
> current _arguments.
I would imagine something simple-minded like the following would do this
consistently. Please commit it if it works.
Index: Completion/Base/Utility/_arguments
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Base/Utility/_arguments,v
retrieving revision 1.20
diff -u -r1.20 _arguments
--- Completion/Base/Utility/_arguments 16 Feb 2007 15:02:03 -0000 1.20
+++ Completion/Base/Utility/_arguments 13 Dec 2007 20:56:36 -0000
@@ -97,7 +97,7 @@
# present. Maybe the problem was that the intervening code
# didn't. If it's buggy without removing them, the problem
# probably is later, not here.
- if [[ -z ${tmp[(r)${match[1]%%[^a-zA-Z0-9-]#}]} ]]; then
+ if [[ -z ${tmp[(r)${match[1]%%[^a-zA-Z0-9_-]#}]} ]]; then
tmp+=($match[1])
fi
opt=$match[2]
@@ -218,9 +218,9 @@
odescr=
fi
if [[ $opt = (#b)(*)\[\=* ]]; then
- opt2=${${match[1]}//[^a-zA-Z0-9-]}=-${dir}${odescr}
+ opt2=${${match[1]}//[^a-zA-Z0-9_-]}=-${dir}${odescr}
else
- opt2=${${opt}//[^a-zA-Z0-9-]}=${dir}${odescr}
+ opt2=${${opt}//[^a-zA-Z0-9_-]}=${dir}${odescr}
fi
if [[ "$descr" = :\=* ]]; then
cache+=( "${opt2}::${(L)${opt%\]}#*\=}: " )
@@ -247,7 +247,7 @@
else
odescr=
fi
- opt2="${${opt%%\=*}//[^a-zA-Z0-9-]}=${dir}${odescr}"
+ opt2="${${opt%%\=*}//[^a-zA-Z0-9_-]}=${dir}${odescr}"
if [[ "$descr" = :\=* ]]; then
cache+=( "${opt2}:${(L)${opt%\]}#*\=}: " )
else
@@ -268,7 +268,7 @@
# I discovered after about half an hour, so don't do that.
"${(@)^${(@)tmp:#^*:*}//:/[}]"
# commands with no description
- "${(@)${(@)tmp:#*:*}//[^a-zA-Z0-9-]}")
+ "${(@)${(@)tmp:#*:*}//[^a-zA-Z0-9_-]}")
if [[ -n "$descr" && "$descr" != ': : ' ]]; then
cache+=( "${(@)^tmp}${descr}" )
else
--
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-12-13 20:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20060711070135.40826124047@star.phys.s.u-tokyo.ac.jp>
2006-10-07 9:53 ` Bug#377765: zsh: completion of configure script does not handle underscore properly Clint Adams
2007-03-29 1:20 ` Ryo IGARASHI
2007-12-13 19:09 ` Clint Adams
2007-12-13 20:56 ` Peter Stephenson
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).