From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10461 invoked from network); 15 Aug 2000 15:45:30 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 15 Aug 2000 15:45:30 -0000 Received: (qmail 28131 invoked by alias); 15 Aug 2000 15:45:25 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12647 Received: (qmail 28124 invoked from network); 15 Aug 2000 15:45:24 -0000 From: "Bart Schaefer" Message-Id: <1000815154431.ZM19272@candle.brasslantern.com> Date: Tue, 15 Aug 2000 15:44:30 +0000 In-Reply-To: <000101c0068a$c6470310$21c9ca95@mow.siemens.ru> Comments: In reply to "Andrej Borsenkow" "Passing state information from one completion function to another?" (Aug 15, 11:31am) References: <000101c0068a$c6470310$21c9ca95@mow.siemens.ru> X-Mailer: Z-Mail (5.0.0 30July97) To: "Andrej Borsenkow" , "ZSH workers mailing list" Subject: Re: Passing state information from one completion function to another? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Aug 15, 11:31am, Andrej Borsenkow wrote: } Subject: Passing state information from one completion function to another } } Is it possible for _sudo to set some state info (notably, that we are after } sudo at all and user name) that can be queried by other functions? Well, _killall (for example) uses $EUID to decide what process IDs to show. So we can use `local -h EUID' in _sudo to make other completion functions believe that the effective user ID has changed. The question is, do we simply always set the local EUID to 0? Do we set it to an EUID specified by a style? Or do we compute it somehow by parsing out the `-u' option argument? Probably one of the latter two; parsing probably requires adding a state for the -u option and an extra call to _arguments, or some such. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net