From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3818 invoked by alias); 7 Mar 2015 07:42:30 -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: 34677 Received: (qmail 7432 invoked from network); 7 Mar 2015 07:42:28 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=FhJrxHmfHWwoBRiOMqkawaLlMkb8FVtdiLl9XCadM5E=; b=OAGuNr1SdkJmhXK7jCi/OZAWI8yad93PyPBrde4GDISVuzqPJYe417ihdSy23uglE0 rfDbzGEy7meZ99F5dxSI1GjLBVEP33qFgyCLCNRoHD6hBtKttw0U+LjVs3SefkO/wsRa ACXZv61tnMI1AClxGOv2xtuNjhWvf507w+TVfpVmuSho+w0mLpboOEh4CqtRVsTEIz8X /XYeErUjFywMnDKXxKKjj2OisFGJ/YcqcfB4n5zQyO4wmNG5fdovACDOFP86Hc2lodJK FUuHIKE7YmLn/dy11YZiBv1roink3r2NaCWQzq2MVEJElZ1H6dSGnR/XcH3XY1hUGCSW n1gA== X-Gm-Message-State: ALoCoQnFrwDyBu4+8LR1hm+H0Ou2m0dWNRNu6TsO1Cs4Z2ZZsk+yM/1Ir+UpeIqcLtJF9t13zEod X-Received: by 10.182.19.167 with SMTP id g7mr13887770obe.75.1425714147814; Fri, 06 Mar 2015 23:42:27 -0800 (PST) From: Bart Schaefer Message-Id: <150306234225.ZM12537@torch.brasslantern.com> Date: Fri, 6 Mar 2015 23:42:25 -0800 In-Reply-To: <20150307042733.GF2206@tarsus.local2> Comments: In reply to Daniel Shahaf "[PATCH] sudo strace -e " (Mar 7, 4:27am) References: <20150307042733.GF2206@tarsus.local2> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: [PATCH] sudo strace -e MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Mar 7, 4:27am, Daniel Shahaf wrote: } Subject: [PATCH] sudo strace -e } } Is there a smarter way to detect whether -e was passed to sudo? Perhaps (( $words[(i)-e] < $words[(i)[^-]*] )) would do? That is, the -e appears before the first word that doesn't begin with a hyphen. The way (i) works in subscripts, the above will always be true if all the words begin with a hyphen. A slight tweak might fix the problem with -Ae not working: (( $words[(i)-(e|Ae)] < $words[(i)[^-]*] ))