Gentoo Archives: gentoo-dev

From: Jason Rhinelander <jason@××××××××××××××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] GLEP: consistent Gentoo tool names
Date: Thu, 18 Mar 2004 19:41:34
Message-Id: 4059FB58.50400@gossamer-threads.com
In Reply to: Re: [gentoo-dev] GLEP: consistent Gentoo tool names by Donnie Berkholz
1 Just thought I'd pipe in here to mention that I've written a wrapper (in
2 bash) which seems to solve the problems in this thread, and more.
3
4 The idea is something like:
5
6 eupdate --list # Displays a list of all available conf utilities
7 eupdate --details # Displays the list with a description of each tool
8 eupdate etc # calls etc-update
9 eupdate gl --help # calls opengl-config --help
10 etc.
11
12 Each -update or -config tool would place a file during installation
13 describing itself into a common directory (I used /var/db/update, but
14 that is easily changeable) where it is picked up by the script. A
15 typical file would look something like:
16
17 NAME=etc
18 COMMAND=/usr/sbin/etc-update
19 DESCRIPTION="Tool to handle configuration file updates"
20
21 or:
22
23 NAME=opengl
24 COMMAND=/usr/sbin/opengl-update
25 DESCRIPTION="Utility to switch between OpenGL implementations"
26
27
28 The script is available here:
29
30 http://jagerman.com/update
31
32 Through a relatively simple bash-completion script (which would only
33 have to call 'eupdate -ql' to get a list of options (see --help)) you
34 could easily add tab completion for this command as well.
35
36 This approach seems more elegant than renaming all the tools, and it
37 means users have a _single_ location to look for update/configuration
38 scripts. It still allows tab completion, as you can do:
39 eup<tab><tab><tab> (once to complete "eupdate", then twice for the list
40 of tools) and have a complete list of all available utilities, and
41 doesn't depend on file naming to group utilities together.
42
43 Additionally, I think beginning linux users aren't, at least initially,
44 used to tab completion, and being able to run:
45
46 some_command --details
47
48 to get a list of all supported utilities *including what they do*, is
49 extremely useful. Running gconfig-<tab><tab> to get a list of utilities
50 is useful, but I don't have any idea what "gconfig-cc" or "gconfig-gcc"
51 or "gupdate-python" _does_. This script gives you that capability.
52
53 Thoughts? Comments?
54
55
56 -- Jason Rhinelander
57 -- Gossamer Threads, Inc.
58
59 --
60 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] GLEP: consistent Gentoo tool names Donnie Berkholz <spyderous@g.o>