On Sat, 21 Apr 2012 10:32:22 +0300 =?ISO-8859-1?Q?Ville_Skytt=E4?=
<ville.sky...@iki.fi> wrote:
> On 2012-04-16 11:16, Paul Wise wrote:
>
> > AFAICT the completion for ls misses the --full-time option:
>
> It does indeed.  The line where --full-time is in --help output trips
> our _longopt function:
>
> $ echo "--full-time            like -l --time-style=full-iso" \
> | sed -ne 's/.*\(--[-A-Za-z0-9]\{1,\}=\{0,1\}\).*/\1/p'
> --time-style=
>
> _parse_help would work better.
>
>
>
Maybe use

grep -o '\(--[-A-Za-z0-9]\{1,\}=\{0,1\}\)' ?

Not sure if "grep -o" is portable as sed, maybe use grep where it has
--only-matching option ?

Regards

Reply via email to