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

Re: cvs completion does not support partial path completion



On Apr 27,  2:20pm, Sven Wischnowsky wrote:
} Subject: Re: cvs completion does not support partial path completion
}
} Andrej Borsenkow wrote:
} 
} > Is "nice to have" in released version ...
} > 
} > bor@itsrm2% cvs diff S/M/t.c (meaning Src/Modules/termcap.c)
} > No matches for: `cvs command', `file', `directory', or `removed file'
} 
} As far as I can see, that directory handling would require re-thinking
} (or just placing a call to _files somewhere at the end as a catch-all
} case when the clever functions failed, but placing it somewhere where it
} won't get called more than once and not too early etc.).

It's not that bad ... at this point:

_cvs_modified_entries () {
  if _cvs_loadstat; then
      local expl match linedir realdir pat
      match=()
      : ${PREFIX:#(#b)(*/)(*)}
      linedir="$match[1]"
      realdir=${(e)~linedir}

Instead of using ${(e)~linedir) to get the realdir, tack /CVS on the end
and use _path_files to generate realdir, then lop off the CVS again and
proceed.

Of course "use _path_files to generate realdir" means editing _path_files
to accept the `-A array' option and pass it through to compadd ... and
fixing all the _cvs functions to handle an array of realdirs rather than
a single one.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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