From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5945 invoked from network); 28 Jan 2000 08:26:50 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 28 Jan 2000 08:26:50 -0000 Received: (qmail 15108 invoked by alias); 28 Jan 2000 08:26:44 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9451 Received: (qmail 15100 invoked from network); 28 Jan 2000 08:26:43 -0000 Date: Fri, 28 Jan 2000 09:26:42 +0100 (MET) Message-Id: <200001280826.JAA20090@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Alexandre Duret-Lutz's message of 27 Jan 2000 18:21:12 +0100 Subject: Re: PATCH: _diff (new), _prcs (upgrade) Alexandre Duret-Lutz wrote: > >>> "Sven" == Sven Wischnowsky writes: > > [...] > > Sven> The rest of the patch just makes some of the descriptions more > Sven> verbose. I hope this is ok for Alexandre (?). > > I don't see why it shouldn't be ok. > > Sven> Oh, and it makes _diff_options use `$(command diff ...)' -- I at least > Sven> have a small wrapper function for it which makes it fail otherwise. > > I first wrote this, and then removed 'command' when I thought that on a > system without GNU diff a user may have installed GNU diff and made diff be > an alias to GNU diff. But maybe it's quite uncommon especially with diff > (which is used by several commands and is thus better put in the PATH). > > Also, I should say: I understand why _pids is running $(command ps ...) > but the difference in _diff_options is that we should be testing the > command that the user is actually running. Actually, I wasn't too sure about _pids either... the problem is that some users may have functions for ps, diff, and so on that may give completely different results when invoked in the way we invoke them. Hm. maybe we should try to solve this in a generic manner by writing a function that is called in such cases, like: _call [ ] (i.e. we use `$(_diff ps)', `$(_call ps list)' and so on). _call would then first see if there is a style `command-line' for the tag `' or, if is given, -. If there is such a style it is used as an array containing the whole command line to use (the styles for ps we have now would be removed). If there is no such style, and $+functions[] is 1, we use `command ', otherwise we use just `'. Does this sound reasonable? Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de