From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29618 invoked from network); 19 Nov 1999 09:21:32 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 19 Nov 1999 09:21:32 -0000 Received: (qmail 16512 invoked by alias); 19 Nov 1999 09:21:26 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8677 Received: (qmail 16505 invoked from network); 19 Nov 1999 09:21:26 -0000 Date: Fri, 19 Nov 1999 10:21:23 +0100 (MET) Message-Id: <199911190921.KAA02203@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Alexandre Duret-Lutz's message of 19 Nov 1999 10:10:50 +0000 Subject: Re: Suggestion for _killall Alexandre Duret-Lutz wrote: > >>> "FH" == Falk Hueffner writes: > > [...] > > FH> Unfortunately, ps behaves different on each platform, so I don't know > FH> if this is really portable. > > It isn't. Perhaps it could be done the same way as _kill? > One other issue is that killall also behaves differently : > > - On Debian (and probably most Linux distribution) it kill > process by names; > > - On Solaris, Digital Unix, RISC/os and maybe others, it kills > *all* actives process and thus completing with process name is > inappropriate. Uh, oh... > Maybe there could be two _killall in Zsh ? Let's say one in > Completion/User/_killall and one in Completion/Linux/_killall. Then > ./configure and Makefile would be hacked to install Linux/* only on > Linux system and in such a way that Linux/* functions would overwrite > previously installed User/* completions. Look quite ugly :( I thought we had agreed that for this kind of stuff the function itself does the test. at least _mount has been doing it for some time now. And now _killall does the same. Dunno if the test is good enough, though. On top of my previous one, obviously. Bye Sven diff -u oldcompletion/User/_killall Completion/User/_killall --- oldcompletion/User/_killall Fri Nov 19 09:56:05 1999 +++ Completion/User/_killall Fri Nov 19 10:18:47 1999 @@ -1,5 +1,9 @@ #compdef killall -_alternative \ - 'signals:: _signals -p' \ - 'processes:process:{ compadd "$expl[@]" ${$(ps ho comm 2> /dev/null):#(ps|COMMAND)} }' +if [[ "$OSTYPE" = linux* ]]; then + _alternative \ + 'signals:: _signals -p' \ + 'processes:process:{ compadd "$expl[@]" ${$(ps ho comm 2> /dev/null):#(ps|COMMAND)} }' +else + _signals -p +fi -- Sven Wischnowsky wischnow@informatik.hu-berlin.de