mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-18 10:26:29 +01:00
Merge pull request #1 from wvragga/master
Changed pkg_list in manager.py to add sorting to lists
This commit is contained in:
commit
dfc099689c
1 changed files with 5 additions and 5 deletions
|
@ -209,7 +209,7 @@ def pkg_list(binary):
|
|||
print # new line at start
|
||||
index, page = 0, 50
|
||||
if "all" in binary:
|
||||
for pkg in os.listdir(pkg_path):
|
||||
for pkg in sorted(os.listdir(pkg_path)):
|
||||
index += 1
|
||||
print("{0}{1}:{2} {3}".format(colors.GREY, index, colors.ENDC, pkg))
|
||||
if index == page:
|
||||
|
@ -217,7 +217,7 @@ def pkg_list(binary):
|
|||
colors.CYAN, colors.ENDC))
|
||||
page += 50
|
||||
if "sbo" in binary:
|
||||
for pkg in os.listdir(pkg_path):
|
||||
for pkg in sorted(os.listdir(pkg_path)):
|
||||
if 'SBo' in pkg:
|
||||
index += 1
|
||||
print("{0}{1}:{2} {3}".format(colors.GREY, index, colors.ENDC, pkg))
|
||||
|
@ -226,7 +226,7 @@ def pkg_list(binary):
|
|||
colors.CYAN, colors.ENDC))
|
||||
page += 50
|
||||
if "slack" in binary:
|
||||
for pkg in os.listdir(pkg_path):
|
||||
for pkg in sorted(os.listdir(pkg_path)):
|
||||
if 'slack' in pkg:
|
||||
index += 1
|
||||
print("{0}{1}:{2} {3}".format(colors.GREY, index, colors.ENDC, pkg))
|
||||
|
@ -235,7 +235,7 @@ def pkg_list(binary):
|
|||
colors.CYAN, colors.ENDC))
|
||||
page += 50
|
||||
if "noarch" in binary:
|
||||
for pkg in os.listdir(pkg_path):
|
||||
for pkg in sorted(os.listdir(pkg_path)):
|
||||
if 'noarch' in pkg:
|
||||
index += 1
|
||||
print("{0}{1}:{2} {3}".format(colors.GREY, index, colors.ENDC, pkg))
|
||||
|
@ -244,7 +244,7 @@ def pkg_list(binary):
|
|||
colors.CYAN, colors.ENDC))
|
||||
page += 50
|
||||
if "other" in binary:
|
||||
for pkg in os.listdir(pkg_path):
|
||||
for pkg in sorted(os.listdir(pkg_path)):
|
||||
if 'SBo' in pkg or 'slack' in pkg or 'noarch' in pkg:
|
||||
pass
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue