Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: need help debugging cvs completion problem
- X-seq: zsh-workers 27067
- From: Greg Klanderman <gak@xxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: need help debugging cvs completion problem
- Date: Sun, 28 Jun 2009 14:52:55 -0400
- In-reply-to: <m3fxdkmeob.fsf@xxxxxxxxxxxxxx> (Greg Klanderman's message of "Sun, 28 Jun 2009 13:49:40 -0400")
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <19013.18790.978774.551126@xxxxxxxxxxxxxxxxxx> <20090627212418.36848701@pws-pc> <m3ljndmbe8.fsf@xxxxxxxxxxxxxx> <m3iqihmabi.fsf@xxxxxxxxxxxxxx> <20090628113802.GA3707@xxxxxxxxxxxxxxx> <m3fxdkmeob.fsf@xxxxxxxxxxxxxx>
- Reply-to: gak@xxxxxxxxxxxxxx
>>>>> Greg Klanderman <gak@xxxxxxxxxxxxxx> writes:
> The directory prefix is getting removed in _cvs_existing_entries, is
> it safe to just paste '$linedir' back on the front of the resulting
> filenames?
this seems to work:
_cvs_existing_entries() {
local expl match linedir realdir files disp
match=()
: ${PREFIX:#(#b)(*/)(*)}
linedir="$match[1]"
realdir=${(e)~linedir}
[[ -f "$realdir"CVS/Entries ]] &&
disp=(${(@)${(@)${(@M)${(@f)"$(<"$realdir"CVS/Entries)"}:#/*}#/}%%/*})
files=( ${linedir}${(@)^disp} )
(( ${#disp} )) && _wanted files expl file compadd -d disp -a files
}
except it now breaks when 'linedir' contains a parameter substitution,
presumably the whole reason for the 'realdir' logic above, because the
'$' in the parameter substitution gets escaped with '\'. But
presumably adding '-Q' to compadd would break completing files that
contain characters that need to be escaped. Should I do that, and
escape characters that need it in $files?
Otherwise I'm running out of ideas; maybe I should look into why
whitespace in file names was not handled before Peter's change in
2003.
greg
Messages sorted by:
Reverse Date,
Date,
Thread,
Author