Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: _approximate doesn't work
- X-seq: zsh-users 12613
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: _approximate doesn't work
- Date: Sun, 17 Feb 2008 19:25:37 +0000
- In-reply-to: Message from Anthony Charles <antho.charles@xxxxxxxxx> of "Sun, 17 Feb 2008 19:17:02 +0100." <20080217181702.GA5143@xxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
Anthony Charles wrote:
> There's a lot of differences
The business end of command completion changed. It used simply to add
the commands array directly; now it goes through the function
_path_commands. The problem is around this bit that's used if descriptions
for the commands are needed (the verbose style is set and at least some
commands have descriptions):
for cmd in ${(@)commands[(I)$PREFIX*]}; do
desc=$_command_descriptions[$cmd]
if [[ -z $desc ]]; then
cmds+=$cmd
else
dcmds+=$cmd
descs+="$cmd:$desc"
fi
done
I can see that _path_commands is skipping this loop, indicating the
expansion was empty. However, I can't see why this is happening.
PREFIX at this point is apparently (#a1)apt_g, so we should get apt-get
as a match in the special commands associative array. This works for me
if I use xsane_g to search for xsane-gimp (since I don't have apt-get).
It's possible this is part of problems with pattern matching: we've had
two independent reports of odd failures suggesting there's something
going on in memory allocation. Ideally, it would be good to debug why
(#a1)apt_g* is failing to match apt-get (having confirmed it is indeed
trying to do so). I can't reproduce any such failure at the moment.
It would be very useful to have someone else cast their eyes over
pattern.c and over any parameter code that allocates memory in order to
call into pattern.c to see if I've made any errors in length calculations.
It's quite likely to be a week before I get a chance to look at it and I
might well miss any problems again.
--
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author