[Bug 1167533] Re: Completions for some long options are missing. (doesn't parse --help output perfectly)

2017-02-04 Thread Mathew Hodson
I don't know if the patch was accepted upstream, but this hasn't made it to Ubuntu. Test cases in OP and comment #6 still fail on Zesty. ** Changed in: bash-completion (Ubuntu) Status: In Progress => Triaged ** Tags added: testcase -- You received this bug notification because you are a

[Bug 1167533] Re: Completions for some long options are missing. (doesn't parse --help output perfectly)

2016-05-12 Thread Mathew Hodson
** Changed in: bash-completion (Ubuntu) Importance: Undecided => Low -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1167533 Title: Completions for some long options are missing. (doesn't parse --

[Bug 1167533] Re: Completions for some long options are missing. (doesn't parse --help output perfectly)

2014-11-30 Thread Peter Cordes
upstream https://alioth.debian.org/tracker/index.php?func=detail&aid=314896&group_id=100114&atid=413095 Patch attached there. Also fixes ls --directory --[TAB] => now completes options rather than deciding that it's right and user is wrong, and only accepting a directory name. Not smart for

[Bug 1167533] Re: Completions for some long options are missing. (doesn't parse --help output perfectly)

2014-11-30 Thread Peter Cordes
fixed it: echo ' -r, --recursive like --directories=recurse' | sed -ne 's/\([^-]\|-[^-]\)*\(--[-A-Za-z0-9]\{1,\}=\{0,1\}\).*/\2/p' --recursive using \([^-]\|-[^-]\)* instead of .* at the front of the pattern makes the greedy match at the front stop at the first --. If there are commands that

[Bug 1167533] Re: Completions for some long options are missing.

2014-11-30 Thread Peter Cordes
bash_completion uses sed -ne 's/.*\(--[-A-Za-z0-9]\{1,\}=\{0,1\}\).*/\1/p' to parse the options out of the --help output for MANY commands, including grep. Unfortunately, it trips up on lines like this from grep: -r, --recursive like --directories=recurse because the .* matches right