zsh-workers
 help / color / mirror / code / Atom feed
* never complete functions beginning with "_"?
@ 2009-01-24 22:46 Greg Klanderman
  2009-01-25  1:16 ` Phil Pennock
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Klanderman @ 2009-01-24 22:46 UTC (permalink / raw)
  To: Zsh list


Hi,

Is there some way to configure completion to never complete function
names starting with "_"?  The ignored-patterns style doesn't seem to
work..  this is especially a problem because I configure substring
completion as a fallback:

zstyle ':completion:*' matcher-list \
           '' 'm:{a-zA-Z}={A-Za-z}' 'l:|=* r:|=* m:{a-zA-Z}={A-Za-z}'

Alternately, some way to modify that matcher-list style to never add a
leading "_" in command positions would work.

It really seems some way to hide all the zle and completion functions
in a separate namespace/package/whatever would be the ideal solution.

thanks,
Greg


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: never complete functions beginning with "_"?
  2009-01-24 22:46 never complete functions beginning with "_"? Greg Klanderman
@ 2009-01-25  1:16 ` Phil Pennock
  2009-01-25  2:45   ` Greg Klanderman
  0 siblings, 1 reply; 3+ messages in thread
From: Phil Pennock @ 2009-01-25  1:16 UTC (permalink / raw)
  To: Zsh list

On 2009-01-24 at 17:46 -0500, Greg Klanderman wrote:
> It really seems some way to hide all the zle and completion functions
> in a separate namespace/package/whatever would be the ideal solution.

I raise the possibility of a new namespace mechanism in the recent
thread "sourcing a sh file in zsh" where I ask for feedback on the idea.

Moving all the zsh autocomplete to a new namespace would be an obvious
good use of that, but there would need to be a compatibility mode to
preserve the current system.  zsh doesn't break things arbitrarily and I
haven't yet thought through how the completion side of things could
interoperate with old completion functions (provided outside zsh), etc
and the interop mode would need to be default and how does this get
managed without getting very grotty?

This is a major can of worms.  So, feedback still welcome on that
thread.  :)  I've just come off oncall and am catching up on sleep, so
might actually get some coding accomplished in the near future.

-Phil


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: never complete functions beginning with "_"?
  2009-01-25  1:16 ` Phil Pennock
@ 2009-01-25  2:45   ` Greg Klanderman
  0 siblings, 0 replies; 3+ messages in thread
From: Greg Klanderman @ 2009-01-25  2:45 UTC (permalink / raw)
  To: Zsh list


>>>>> Phil Pennock <zsh-workers+phil.pennock@spodhuis.org> writes:

> I raise the possibility of a new namespace mechanism in the recent
> thread "sourcing a sh file in zsh" where I ask for feedback on the idea.

I saw that, I think you only proposed this for variables, but
encapsulation is definitely useful for functions too.

> This is a major can of worms.

Which is why I only mentioned it offhand.  If there's serious
interest in pursuing this I recommend studying similar facilities
offered by other languages before finalizing the design.

Greg


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-01-25  2:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-24 22:46 never complete functions beginning with "_"? Greg Klanderman
2009-01-25  1:16 ` Phil Pennock
2009-01-25  2:45   ` Greg Klanderman

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).