[Bash-completion-devel] Bug#668973: Bug#668973: bash-completion: completion for ls misses the --full-time option

Javier Barroso javibarroso at gmail.com
Sun Feb 18 23:38:17 UTC 2018


On Sat, 21 Apr 2012 10:32:22 +0300 =?ISO-8859-1?Q?Ville_Skytt=E4?=
<ville.skytta at 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



More information about the Bash-completion-devel mailing list