zsh-workers
 help / color / mirror / code / Atom feed
From: Greg Klanderman <gak@klanderman.net>
To: zsh-workers@sunsite.dk
Subject: Re: need help debugging cvs completion problem
Date: Sun, 28 Jun 2009 14:52:55 -0400	[thread overview]
Message-ID: <m3d48ombqw.fsf@klanderman.net> (raw)
In-Reply-To: <m3fxdkmeob.fsf@klanderman.net> (Greg Klanderman's message of "Sun, 28 Jun 2009 13:49:40 -0400")


>>>>> Greg Klanderman <gak@klanderman.net> 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


  reply	other threads:[~2009-06-28 18:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-26 22:19 Greg Klanderman
2009-06-27 20:24 ` Peter Stephenson
2009-06-28  0:48   ` Greg Klanderman
2009-06-28  1:11     ` Greg Klanderman
2009-06-28 11:38       ` Geoff Wing
2009-06-28 17:49         ` Greg Klanderman
2009-06-28 18:52           ` Greg Klanderman [this message]
2009-06-28 19:54             ` Peter Stephenson
2009-06-28 20:16               ` Peter Stephenson
2009-07-07 14:15               ` Greg Klanderman
2009-07-07 15:11                 ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3d48ombqw.fsf@klanderman.net \
    --to=gak@klanderman.net \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).