From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23300 invoked by alias); 21 Jul 2016 16:18:53 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 38905 Received: (qmail 19737 invoked from network); 21 Jul 2016 16:18:53 -0000 X-Qmail-Scanner-Diagnostics: from nm34-vm9.bullet.mail.ir2.yahoo.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(212.82.97.123):SA:0(0.0/5.0):. Processed in 0.118309 secs); 21 Jul 2016 16:18:53 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM,SPF_PASS, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: okiddle@yahoo.co.uk X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.mail.yahoo.com designates 212.82.97.123 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1469117573; bh=0fKf+6bDCFMb8KC4BHlqMFJaszlEMFjmuYDCfUrtWwc=; h=cc:In-reply-to:From:References:To:Subject:Date:From:Subject; b=ebEw1FaRZ7fVAeidQPt+fPFCUJhHdN3Qf2juSDegndObfsyMiG2AGTI/uWdntpSQmIuO/+5I4qobhRep8lB6wG3JLdvBi0Wzpq8ziD4YZyaXwolIlasmJFPUaVOkp5NYZiDFx9OqAJVdUC7MnfI/V8uvQmuGAn/L6dYn8zVGdCLzo/LFnRQU7KCD/6uLxIQUWVeT7d32J0vcpPmanDloNj5lEC7DfrdREg8AICm0oNL65fMFltQdEmzH+2txRmoRJKQyvGhp/1e9IjzcKZi9ctpuav4CNRC+sGrNqYps48RNM+ASApahSioQZmIX++ts3irahSYLOY2V6SdjDX3B7A== X-Yahoo-Newman-Id: 357981.20084.bm@smtp149.mail.ir2.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: sOLxZ1MVM1mD4z0WkOl.EIsT.Opdqme5zR7oYNzVWuLNIJ5 iZ8GSiroMYYBxrMk3gCHk9RSniP2RL46bsGIyL9f4aPC6dtKrVdX_g4w1g9z RdHwDXu8dfsBsAAOKhGp5kOaPnOVesHha5WnXLCsoRsMIZMLkU5SeP8PHoFJ ATUdFF88P0mnpwv.n7Srk6Xecopf0eilYeh.Qn7x5cXnEDzDRNQbIouXvhKc kyNjUoDOniKDtzZHDvrf0CAgb1AooX7ktuhZ9r..zd1ZxPyNYIsq0A4lrBhN wb64lUMU2pAKgE5x_bNBHJ1XsC2FJ7jJmaoSvIqohvApH71rTJAYvjF73BBI mh5xXUbEpNFNKwsvoGkKi.hme.fgCh5Mf22DvclCTtNwrZM6xdWFanQX7Oeo 0132UImXyOwYJg3DIGX.TzgQ1a.lEKXc6p2wtSS3.IWr7vBkdX5sAHoxuIc6 bbpnfSwTkm7kWoBbRG6gbvNnDtK9HLnh.JwOi_GF5rpuIusGAW.K5a0kACBk ZzvH8hOXWBefq0JiCaHck5fUX3gM9kb25yDkBBCPV5Xc- X-Yahoo-SMTP: opAkk_CswBAce_kJ3nIPlH80cJI- cc: zsh-workers@zsh.org In-reply-to: <699166a0-b0f0-452c-2561-b7e3cc952062@redhat.com> From: Oliver Kiddle References: <8eb6dce0-50d7-5ab2-503a-194c1de2e45d@redhat.com> <20160713045957.GA3893@tarsus.local2> <9968da53-c1fd-fa2a-f30c-c74f884d2478@redhat.com> <20160720065832.GA28939@tarsus.local2> <699166a0-b0f0-452c-2561-b7e3cc952062@redhat.com> To: Marko Myllynen Subject: Re: [PATCH] _virsh (Was: Re: zsh virsh completion) MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <25000.1469117569.1@hydra.kiddle.eu> Date: Thu, 21 Jul 2016 18:12:49 +0200 Message-ID: <25001.1469117569@hydra.kiddle.eu> Marko Myllynen wrote: > + _values servers ${=${(S)${${(f)$(sudo virt-admin srv-list)}##*--- }//[0-9]* }} && return 0 > + _values servers ${=${${(f):-"$(sudo virt-admin srv-clients-list --server $srv)"}/ [a-z]*}//[^0-9]} && return 0 I have pushed the change but I've just noticed these two lines. I'm not sure it is a good idea to be running sudo within completion functions. That can trigger logging and is often denied when you're already root. And there may be alternatives like doas. There's also another instance of this in Mandriva/Command/_rebootin. Anyone, have any thoughts on how this should be handled? I'm inclined to think that users should have to specifically set a gain-root style to enable this. Or perhaps it could only trigger if you complete after sudo virt-admin. Oliver