From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5661 invoked from network); 15 Aug 2000 07:31:24 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 15 Aug 2000 07:31:24 -0000 Received: (qmail 5526 invoked by alias); 15 Aug 2000 07:31:13 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12634 Received: (qmail 5519 invoked from network); 15 Aug 2000 07:31:12 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer goliath.siemens.de) From: "Andrej Borsenkow" To: "ZSH workers mailing list" Subject: Passing state information from one completion function to another? Date: Tue, 15 Aug 2000 11:31:06 +0400 Message-ID: <000101c0068a$c6470310$21c9ca95@mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal What I'd like to have is to list only my own processes in "normal" case and everything in case of root. This works with a single exception of sudo (and may be su) - in this case completion happens in current user context and does not know if it was root or not. 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? Of course, that shoould be cleaned up after completion exits. This may be useful in other cases as well - some generic test "if command is to be executed as root/other user" -andrej Have a nice DOS! B >>