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

Re: need help debugging cvs completion problem

>>>>> 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
  : ${PREFIX:#(#b)(*/)(*)}
  [[ -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


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