Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 158841 - genlop bash-completion broken
Summary: genlop bash-completion broken
Status: RESOLVED DUPLICATE of bug 119518
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-22 08:21 UTC by David Benjamin
Modified: 2006-12-22 08:27 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to /usr/share/bash-completion/genlop (genlop.patch,1.54 KB, patch)
2006-12-22 08:26 UTC, David Benjamin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Benjamin 2006-12-22 08:21:55 UTC
When pressing tab to tab-complete on genlop, one gets this error.

bash: [: =: unary operator expected

The /usr/bash-completion/genlop script does not quote some arguments in test clauses, so bash misinterprets it... (will attach a patch, there doesn't seem to be an attachment box in bug reporting spot though)

(I hope I'm not reporting this in the wrong place, the file has a Gentoo copyright on it, so I assume it's yours...)
Comment 1 David Benjamin 2006-12-22 08:26:42 UTC
Created attachment 104585 [details, diff]
patch to /usr/share/bash-completion/genlop

patchfile to fix problem...

I also went ahead and changed grep to basic regexp as opposed to extended regexp because basic has ^, *, and ., and has less of a chance to prevent collisions in the user's typing. (and it might be faster, but I doubt it)

Also, I quoted the other if statements even though they don't seem to be causing a problem right now. (The ${portagedir} one is the culprit.) Just in case some problems come up... (although, weird things would have to happen if the wc -l one breaks if)
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2006-12-22 08:27:14 UTC

*** This bug has been marked as a duplicate of 119518 ***

*** This bug has been marked as a duplicate of 119518 ***