Re: global commands

Stefan Karrmann <[email protected]> Fri, 27 Dec 2002 17:22:19 +0100
Newsgroups gmane.comp.djb.package
Message-ID <20021227162219.GA290@johann>
Laurent Bercot (Mon, Dec 23, 2002 at 07:40:25AM +0100):
> > How can I find all globally registered commands of package foo?
> > 
> > 1. Take all files in /package/foo/command ?
> >    Is this really the current convention or does a package exist
> >    with private or local commands in it?
> 
> /package/foo/command is not even "official". You could have commands
> in i.e. /package/foo/bin .
>  I think using /package/foo/command is a good convention for foo's
> commands, but there is no reason not to include unregistered commands.
> Some of my packages export only part of the commands that are listed
> in /package/foo/command .

Is it possible to change them? Some packages must be changed anyway,
if we want to identify global commands.

> >    b. Is /package/foo/package/command for this purpose?
> 
>  From what we can see in Dan's packages, either package/command has that
> purpose, or package/command lists every command in the package, both
> exported and unexported. I have built my packages according to the latter
> supposition.

> > If the globally registered commands are declared in a file like in (2)
or (1)
> > a slash-package manager can easily use this information to update
> > /command.
> 
>  Yes. I think that (2) makes the most sense. I'll be happy to comply
> with such a policy.


Paul Jarc (Tue, Dec 24, 2002 at 05:56:16AM -0500):
> Laurent Bercot <[email protected]> wrote:
> > Stefan Karrmann <[email protected]> wrote:
> >> How can I find all globally registered commands of package foo?

> >> 1. Take all files in /package/foo/command ?

> That's my vote.

That would be mine, too, if not exists packages with non-global or
private commands in it. How many are there?

Public but non-global commands and pre-slash package commands could
go into cmd-pub and (cmd-pub or cmd-pre), respectivly?
But this belongs to each package on its own.

> >  I think using /package/foo/command is a good convention for foo's
> > commands, but there is no reason not to include unregistered commands.
> > Some of my packages export only part of the commands that are listed
> > in /package/foo/command .
> 
> I'd rather put unregistered commands in a separate directory.  That
> way, we get the list of registered commands for free: command/*.
> 
> >> If the globally registered commands are declared in a file like in (2)
> >> a slash-package manager can easily use this information to update
> >> /command.
> 
> The same is true for (1): the file could be a directory.  That's the
> natural way to represent a list in the filesystem.

-- 
Stefan Karrmann