Completions for some long options are missing. (doesn't parse --help output perfectly)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
bash-completion (Ubuntu) |
Triaged
|
Low
|
Unassigned |
Bug Description
I noticed today that "--recursive" is missing from the completions for grep. A quick glance grep's man page reveals that other long options such as "--text" are also missing. I'm not sure what the pattern is.
Steps to reproduce:
1) Type "grep --".
2) Press <Tab> twice.
3) Observe that "--recursive" is missing.
ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: bash-completion 1:2.0-1ubuntu3
ProcVersionSign
Uname: Linux 3.8.0-17-generic x86_64
NonfreeKernelMo
ApportVersion: 2.9.2-0ubuntu5
Architecture: amd64
Date: Wed Apr 10 12:32:24 2013
InstallationDate: Installed on 2013-04-07 (2 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Alpha amd64 (20130402.1)
MarkForUpload: True
PackageArchitec
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
XDG_RUNTIME_
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: bash-completion
UpgradeStatus: No upgrade log present (probably fresh install)
Changed in bash-completion (Ubuntu): | |
importance: | Undecided → Low |
bash_completion uses --[-A-Za- z0-9]\{ 1,\}=\{ 0,1\}\) .*/\1/p'
sed -ne 's/.*\(
to parse the options out of the --help output for MANY commands, including grep.
Unfortunately, it trips up on lines like this from grep: recurse
-r, --recursive like --directories=
because the .* matches right up to before --directories= recurse. d'oh.
It gets --directories out of that line.