interactive: list_spi: Accept and split string as first argument
Use case: to show info on all packages in your clipboard, do: >>> list_spi(''' ... <paste> ... ''')
This commit is contained in:
parent
a46ff4b5d4
commit
573ff92a85
@ -170,6 +170,8 @@ g = gspi # noqa
|
||||
|
||||
|
||||
def list_spi(pkgs, colors=None, to=print):
|
||||
if isinstance(pkgs, basestring):
|
||||
pkgs = pkgs.split()
|
||||
pset = frozenset(pkgs)
|
||||
lines = _spi_by_predicate(pset.__contains__, colors)
|
||||
unknown = pset - frozenset(BY_NAME)
|
||||
|
Loading…
Reference in New Issue
Block a user