Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] sudo strace -e <TAB>
- X-seq: zsh-workers 34677
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [PATCH] sudo strace -e <TAB>
- Date: Fri, 6 Mar 2015 23:42:25 -0800
- In-reply-to: <20150307042733.GF2206@tarsus.local2>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20150307042733.GF2206@tarsus.local2>
On Mar 7, 4:27am, Daniel Shahaf wrote:
} Subject: [PATCH] sudo strace -e <TAB>
}
} 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)[^-]*] ))
Messages sorted by:
Reverse Date,
Date,
Thread,
Author