zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: PATCH: completion
Date: Wed, 27 Oct 1999 10:42:32 +0200 (MET DST)	[thread overview]
Message-ID: <199910270842.KAA16188@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: "Bart Schaefer"'s message of Tue, 26 Oct 1999 17:17:16 +0000


Bart Schaefer wrote:

> ...
> 
> Which also means "compiled in to static builds".  Did you try a static
> build?  I guess I'll find out soon enough.

I tried it with a fully dynamic shell and a dynamic-enabled shell but
with `complete' linked in and then once with `compctl' loaded
dynamically and once with `compctl' linked in.

> ...
> 
> } - Since this was asked by Bart: yes, I made `functions' show disabled
> }   functions, too. I think this is right because `functions' should
> }   show the contents of the functions hash table.
> 
> I don't think I agree with this.  The purpose of "functions" is not just
> to dump the hash table; it's for user information.  If a function has
> been disabled for some reason, it shouldn't be shown:  "disable" is among
> other things a sysadmin tool for concealing things that certain users
> should not see.
> 
> Which, incidentally, makes me think of something I hadn't before:  If a
> sysadmin wanted to prevent users from changing the completion setup in
> the old system, he could simply "disable compctl" in /etc/zshenv.  Now,
> there's no way to lock in a fixed set of completion functions.
> 
> Do we need to be able to mark functions read-only, as can be done with
> parameters?

Interesting, hadn't thought about that...

> ...
> 
> }   However, the way they 
> }   are currently represented (with the `<disabled>' prefix) is not nice 
> }   and I'd like to hear if anyone can think of something better.
> 
> "Not nice" doesn't even begin to cover it:  `eval "$(functions myfunc)"'
> might read from a file named "disabled" and write it to "myfunc"!

No, the output of `functions' isn't changed (of course).

> }   Maybe we should just add a `disabled' parameter containing all
> }   disabled functions, aliases, etc.
> 
> Can't do that without disambiguating somehow -- you could have an alias,
> a function and a command all named "foo" all of which are disabled.
> However, this is probably the best way to go.

That's why I also suggested splitting them into pairs: `functions' and 
`disabledfunctions' (or `disfunctions' or something like that).

I already came to the conclusion that this is probably the way to
go. It will also make some completion functions simpler.

> } - For the `userdirs' parameter I move the fast YP/NIS code into
> }   `hashtable.c' (where the fill-table-function used `getpwent()').
> 
> There was already too much stuff in hashtable.c, IMO ... it'd be nice
> to have one file that is the hash table implementation, and one or more
> others that create each of the hash table instances.

Right. It irritated me a lot when I found such code in that file.

> ...
> 
> I don't think it's "too late," but I don't have a strong opinion either
> way on whether to add a prefix.  Given that they're all now "hidden" by
> default, so that they won't conflict with locals declared in e.g. ksh
> functions, I don't think it's as big a deal, and the consistency with
> e.g. $signals (for which it _is_ too late) is nice.
> 
> On the other hand, reducing collisions is probably a good thing too.

;-) Don't go to the elves for advice...

> } If you load the parameter module in your `.zshrc', you'll notice that
> } `compinit' now loads `parameter' and `zleparameter'. Without `compgen' 
> } we need it in too many places to get away without it.  And now the same 
> } question as for the `computil' module: should we make them be
> } automatically autoloaded (and linked in for static shells)
> 
> Yes!  If the stock set of completion functions are useless without them,
> they have to be linked into static shells.  However, it would be nice if
> they weren't actually "loaded" in the zmodload sense until they were
> needed, even in a static shell.  That's going to require some changes to
> the way zmodload and static modules work.

Right. Hadn't thought about that either. But in a fully static shell,
wouldn't it a bit surprising when, for example, parameters just appear 
because they are used (because they were `autoloaded')?


Anyway, the patch at least makes the parameter modules autoloaded.

Bye
 Sven

diff -u oldsrc/xmods.conf Src/xmods.conf
--- oldsrc/xmods.conf	Wed Oct 27 10:38:17 1999
+++ Src/xmods.conf	Wed Oct 27 10:39:01 1999
@@ -5,3 +5,5 @@
 sched
 complist
 computil
+parameter
+zleparameter
diff -u oldcompletion/Core/compinit Completion/Core/compinit
--- oldcompletion/Core/compinit	Tue Oct 26 13:12:03 1999
+++ Completion/Core/compinit	Wed Oct 27 10:39:37 1999
@@ -78,10 +78,6 @@
   fi
 done
 
-# We need the parameter modules.
-
-zmodload -i parameter zleparameter
-
 # The associative array containing the definitions for the commands.
 # Definitions for patterns will be stored in the normal arrays `_patcomps'
 # and `_postpatcomps'.
diff -u olddoc/Zsh/compsys.yo Doc/Zsh/compsys.yo
--- olddoc/Zsh/compsys.yo	Tue Oct 26 13:11:30 1999
+++ Doc/Zsh/compsys.yo	Wed Oct 27 10:42:03 1999
@@ -23,10 +23,6 @@
 ifnzman(noderef(Matching Control))
 for further details.
 
-Also note that this completion system requires the tt(parameter) and
-tt(zleparameter) modules to be linked into the shell or to be
-dynamically loadable.
-
 startmenu()
 menu(Initialization)
 menu(Control Functions)

--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


             reply	other threads:[~1999-10-27  8:45 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-10-27  8:42 Sven Wischnowsky [this message]
1999-10-27 16:39 ` Bart Schaefer
  -- strict thread matches above, loose matches on Subject: below --
2000-02-21  9:50 Sven Wischnowsky
1999-10-28  8:12 Sven Wischnowsky
1999-10-28  6:58 Sven Wischnowsky
1999-10-27  7:14 Sven Wischnowsky
1999-10-27 21:26 ` Tanaka Akira
1999-10-26 13:17 Sven Wischnowsky
1999-10-26 13:01 Oliver Kiddle
1999-10-26 13:35 ` Zefram
1999-10-26 11:03 Sven Wischnowsky
1999-10-26 17:17 ` Bart Schaefer
1999-10-26 17:22 ` Tanaka Akira
1999-10-26 17:32   ` Tanaka Akira
1999-08-30  9:30 Sven Wischnowsky
1999-08-27  7:03 Sven Wischnowsky
1999-08-27  8:29 ` Tanaka Akira
1999-08-28  6:01   ` Tanaka Akira
1999-08-26 13:52 Sven Wischnowsky
1999-08-26 12:20 Sven Wischnowsky
1999-08-26 13:17 ` Tanaka Akira
1999-08-26 17:56 ` Tanaka Akira
1999-08-25 12:57 Sven Wischnowsky
1999-08-25 12:54 Sven Wischnowsky
1999-08-25  8:24 Sven Wischnowsky
1999-08-26 10:54 ` Tanaka Akira
1999-08-24 10:43 Sven Wischnowsky
1999-08-25  1:56 ` Tanaka Akira
1999-08-24  9:12 Sven Wischnowsky
1999-08-24 10:04 ` Tanaka Akira
1999-08-23 13:46 Sven Wischnowsky
1999-08-23 16:16 ` Tanaka Akira
1999-08-24 15:56 ` Tanaka Akira
1999-08-23 12:00 Sven Wischnowsky
1999-08-23  9:32 Sven Wischnowsky
1999-08-23 10:54 ` Tanaka Akira
1999-08-20 12:59 Sven Wischnowsky
1999-08-20 23:22 ` Tanaka Akira
1999-08-21  8:39   ` Tanaka Akira
1999-08-21 17:47     ` Tanaka Akira
1999-08-20  7:42 Sven Wischnowsky
1999-08-19 13:59 Sven Wischnowsky
1999-08-19 10:44 Sven Wischnowsky
1999-08-19 14:38 ` Tanaka Akira
1999-08-24 13:46 ` 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=199910270842.KAA16188@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --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).