diff options
| author | Ville Skyttä <ville.skytta@iki.fi> | 2011-05-05 00:06:58 +0300 |
|---|---|---|
| committer | Ville Skyttä <ville.skytta@iki.fi> | 2011-05-05 00:06:58 +0300 |
| commit | 3334711726f4b8bba9e89db029c1ff7a1ad15160 (patch) | |
| tree | 82478cf1e25f97edbb4e4d0aef36eb476aadbe97 /bash_completion | |
| parent | db86b76ebaf9196dab651a51e363a5e9cebd3203 (diff) | |
| download | bash-completion-3334711726f4b8bba9e89db029c1ff7a1ad15160.tar.gz | |
_parse_usage: Deal with whitespace in brackets.
Diffstat (limited to 'bash_completion')
| -rw-r--r-- | bash_completion | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bash_completion b/bash_completion index 5012c112..29a2ed94 100644 --- a/bash_completion +++ b/bash_completion @@ -803,7 +803,7 @@ _parse_usage() local line match option i char "$cmd" ${2:---usage} 2>&1 | while read -r line; do - while [[ $line =~ \[(-[^]]+)\] ]]; do + while [[ $line =~ \[[[:space:]]*(-[^]]+)[[:space:]]*\] ]]; do match=${BASH_REMATCH[0]} option=${BASH_REMATCH[1]} case $option in |
