new function for "list" type queries
    Jon South 
    striker at lunar-linux.org
       
    Mon Jul 10 19:38:43 UTC 2006
    
    
  
Auke Kok wrote:
> I don't like the "|" character as a separator, and I think it should be 
> removed. Not only would strange things happen if accidentally someone sh'd a 
> CONFIGURE file, it also isn't the standard style we've been using
> 
> can you rewrite it so the format would become:
> 
>  > +lquery MPM "Please select a Multi-Processing Module (MPM)." 
> "prefork|Prefork (Default)" "worker|Worker"
> 
> lquery MPM "Please select a Multi-Processing Module (MPM)." \
>         "prefork" "Prefork thread model (Default)" \
>         "worker" "Worker thread model (recommended when using NPTL threads)"
> 
> this would also be much more readable.
> 
> Auke
Pipes only cause problems outside quotes, but I can see your point if 
someone commits without them (although I cant think of any module that 
doesn't use quotes for things like this ;P). The reason I did it like 
this is because it keeps the code shorter much simpler.
To make it work with that many arguments, you'd probably end up changing
   for TARGET ; do
to this:
   while [[ -n "$1" ]]; do
     $VALUE=$1
     $DESC=$2
     shift;shift
and adjusting the rest accordingly. Though, i'm not sure if you'd have 
scope issues with the $1 in the while statement.
-Striker
    
    
More information about the Lunar-dev
mailing list