From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3711 invoked from network); 13 Apr 2000 09:27:35 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 13 Apr 2000 09:27:35 -0000 Received: (qmail 8083 invoked by alias); 13 Apr 2000 09:27:12 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10731 Received: (qmail 8069 invoked from network); 13 Apr 2000 09:27:11 -0000 Message-ID: <38F592D6.B3CC259A@u.genie.co.uk> Date: Thu, 13 Apr 2000 10:26:46 +0100 From: Oliver Kiddle X-Mailer: Mozilla 4.72 [en] (Win95; I) X-Accept-Language: en MIME-Version: 1.0 To: zsh-workers@sunsite.auc.dk Subject: Re: optioninfo.so References: <000601bfa516$701681d0$21c9ca95@mow.siemens.ru> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Andrej Borsenkow wrote: > > > Z(4):akr@serein% _ls_arguments=($(LD_PRELOAD=$PWD/optioninfo.so ls)) > ^^^^^^^^^^ argh! > > > > Although this is not so sophisticated now and it is not portable, it > > is very useful in some case. How about this? > Yes, it is not very portable. Do you suggest to use it outside of Zsh? > Or in Zsh completion? If it can be made Zsh module - why not. But > please, no PRELOAD fiddling. I think it is a very nice idea and with a bit of thought and effort, we should be able to make good use of it for the completion system. I don't have a problem with PRELOAD fiddling. The principle of pre-loading works on a number of platforms but I think the specifics of it vary. On IRIX, it is something like _RLD_LIST, I have the exact details somewhere. Where is the real getopt_long going to be on non-Linux systems? Is it staticly compiled into and GNU binaries and if so, will preloading still work? What we will probably need to do is use a wrapper script around this. It could take the same arguments as _arguments. Where we can't use preloading, it could just pass everything straight through to _arguments. Otherwise it would have to take the options from optioninfo.so and merge them with the arguments we passed. This would allow us to get at any descriptions. We would also need to account for programs which use getopt_long but don't have a specific completion. Another consideration is that the programs will need to be called in a safe way so some might need a --help option. Oliver