* PATCH: _complete_debug and Re: Completion troubles
@ 2000-05-02 11:50 Oliver Kiddle
2000-05-02 15:16 ` Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: Oliver Kiddle @ 2000-05-02 11:50 UTC (permalink / raw)
To: Zsh workers
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: PATCH: _complete_debug and Re: Completion troubles
2000-05-02 11:50 PATCH: _complete_debug and Re: Completion troubles Oliver Kiddle
@ 2000-05-02 15:16 ` Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2000-05-02 15:16 UTC (permalink / raw)
To: Zsh workers
On May 2, 12:50pm, Oliver Kiddle wrote:
}
} > 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.
Ooops.
} With the print -zR line in _complete_debug, why is $VISUAL and $EDITOR
} used? Why would anyone want to edit the trace file?
I always want to edit the trace file. It's much easier to search forward
and backward in most editors than it is in most pagers, and I also find it
helpful to be able to delete (or hide with narrowing in emacs) large parts
of the trace that I have determined to be unrelated to the problem.
} > } 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.
Ah. That's a little odd, since `glob' ususally means filename generation
and `~' is filename expansion, but there probably isn't any useful way to
distinguish the two during _expand.
} 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)
Hmm, I was sure I tested that. Got the redirection in the wrong place.
--- zsh-forge/current/Completion/Core/_expand Mon May 1 10:58:58 2000
+++ Completion/Core/_expand Tue May 2 08:04:07 2000
@@ -39,7 +39,7 @@
{ [[ "$curcontext" = expand-word:* ]] && expr=1 } } &&
[[ "${(e):-\$[$expr]}" -eq 1 ]] &&
exp=( ${(f)"$(print -lR - ${(e)exp//\\[
-]/ } 2>/dev/null)"} )
+]/ })"} ) 2>/dev/null
# If the array is empty, store the original string again.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-05-02 15:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-02 11:50 PATCH: _complete_debug and Re: Completion troubles Oliver Kiddle
2000-05-02 15:16 ` Bart Schaefer
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).