From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6352 invoked from network); 15 Aug 2000 09:13:17 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 15 Aug 2000 09:13:17 -0000 Received: (qmail 16224 invoked by alias); 15 Aug 2000 09:13:03 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12639 Received: (qmail 16217 invoked from network); 15 Aug 2000 09:13:02 -0000 Date: Tue, 15 Aug 2000 11:13:00 +0200 (MET DST) Message-Id: <200008150913.LAA05156@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: "Andrej Borsenkow"'s message of Tue, 15 Aug 2000 12:42:32 +0400 Subject: RE: Passing state information from one completion function to another? Andrej Borsenkow wrote: > > Shouldn't it be enough to use `zstyle -e' and test if $words contains > > `sudo' (probably as the first word)? > > > Ehh but if I understand it correctly, in case of > > sudo kill TAB > > $words is modified to be just (kill), removing sudo and any of it's option? In > more general case > > sudo -u foo kill TAB > > it would be nice to know that we are su'ing to user foo and not to root. > > The problem is, I need this information not when completing sudo but when > completing command after sudo. Ouch. Right. Would testing $BUFFER be enough? Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de