Re-added support for completing removals in tab-completer

The broken "do_hint" was caused by lack of versions in the resulting
hint.

Signed-off-by: Niels Thykier <niels@thykier.net>
master
Niels Thykier 13 years ago
parent 8a1a43c965
commit 44352da611

@ -34,15 +34,15 @@ class Completer:
# - it might contain too many items, but meh # - it might contain too many items, but meh
complete = [] complete = []
for e in britney.excuses: for e in britney.excuses:
if e.name[0] == '-':
# do_hint does not work with removals anyway
continue
else:
ver = None ver = None
pkg = e.name pkg = e.name
suite = 'unstable'
if pkg[0] == '-':
suite = 'testing'
pkg = pkg[1:]
if "/" in pkg: if "/" in pkg:
pkg = pkg.split("/")[0] pkg = pkg.split("/")[0]
name = "%s/%s" % (e.name, britney.sources['unstable'][pkg][0]) # 0 == VERSION name = "%s/%s" % (e.name, britney.sources[suite][pkg][0]) # 0 == VERSION
complete.append(name) complete.append(name)
self.packages = sorted(complete) self.packages = sorted(complete)

Loading…
Cancel
Save