zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <opk@u.genie.co.uk>
To: Zsh workers <zsh-workers@sunsite.auc.dk>
Subject: PATCH: _complete_debug and Re: Completion troubles
Date: Tue, 02 May 2000 12:50:01 +0100	[thread overview]
Message-ID: <390EC0E9.54E0FA69@u.genie.co.uk> (raw)

On May 1, 5:45pm, Bart Schaefer wrote:
> 
> I get an error message about ~/.nedit not being found.  I don't have
> to have a .nedit to run nedit, do I?

No, I should have thought of that when I reworked _nedit with
_arguments before submitting it. Thanks for sorting that out.

> I have a suspicion that you're getting the wrong version of _nedit
> somehow, but I can't be sure.

Oops, that was the problem, sorry. I'll have to add a directory to the
end of my fpath for writing new functions.

> Use _complete_debug, ^X?, and examine the trace file.

I actually, have nedit aliased to /usr/local/bin/nc and _complete_debug
had a few problems creating a trace file with lots of slashes in its
name. Small fix follows. Once fixed, that was useful, thanks.

With the print -zR line in _complete_debug, why is $VISUAL and $EDITOR
used? Why would anyone want to edit the trace file? Surely it would be
better to just use ${PAGER:-more} by default and use a style for anyone
who wants greater control and for warped people who like to use vi as
their pager as well as their editor.
 
> } The other thing is the _expand completer now seems to be expanding
> } everything after a tilde which is annoying.
> 
> Hmm, that doesn't happen to me;  I get this sort of thing:

You get what I would expect. Try setting the glob style to a true value.
It is done on line 54 of _expand. I tried running dev-22 to see what has
changed. It seems that in dev-22 _expand was only passed the '+' whereas
now, it also gets '~' so it is expanding to whatever ~+ is. In a way,
this makes more sense.

> That one also works for me.  I think you must have the `substitute' style
> set to a true value.  However, we can fix the problem with the closing
> brace; that happens because a missing close-brace is a parse error that

You're right about substitute being true as being significant. I'm not
sure that your fix has worked enitiely though - I get an error message
about the closing brace being expected. What do you get if you do:
exp='${foo'
echo $(print -lR - ${(e)exp} 2>/dev/null)

Oliver

--- Completion/Commands/_complete_debug	Sun Apr 30 11:04:29 2000
+++ Completion/Commands/_complete_debug	Tue May  2 10:51:55 2000
@@ -4,7 +4,7 @@
 unsetopt markdirs globsubst shwordsplit nounset ksharrays
 
 (( $+_debug_count )) || integer -g _debug_count
-local tmp=${TMPPREFIX}${$}${words[1]}$[++_debug_count]
+local tmp=${TMPPREFIX}${$}${words[1]:t}$[++_debug_count]
 local w="${(qqq)words}"
 
 [[ -t 2 ]] && exec 3>&2 2>| $tmp


             reply	other threads:[~2000-05-02 11:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-02 11:50 Oliver Kiddle [this message]
2000-05-02 15:16 ` Bart Schaefer

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=390EC0E9.54E0FA69@u.genie.co.uk \
    --to=opk@u.genie.co.uk \
    --cc=zsh-workers@sunsite.auc.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).