This change sorts the list of the installed modules by name.
It also adds some files to .gitignore to make checkins easier.
This commit is contained in:
parent
ac1714ffef
commit
14e0ca9a3b
2 changed files with 8 additions and 1 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -7,3 +7,8 @@ nimcache/
|
||||||
/src/babel
|
/src/babel
|
||||||
/src/nimble
|
/src/nimble
|
||||||
/tests/tester
|
/tests/tester
|
||||||
|
|
||||||
|
# executables from test and build
|
||||||
|
/nimble
|
||||||
|
/tests/nimscript/nimscript
|
||||||
|
/tests/issue27/issue27
|
||||||
|
|
|
||||||
|
|
@ -631,7 +631,7 @@ proc list(options: Options) =
|
||||||
echo(" ")
|
echo(" ")
|
||||||
|
|
||||||
proc listInstalled(options: Options) =
|
proc listInstalled(options: Options) =
|
||||||
var h = initTable[string, seq[string]]()
|
var h = initOrderedTable[string, seq[string]]()
|
||||||
let pkgs = getInstalledPkgs(options.getPkgsDir(), options)
|
let pkgs = getInstalledPkgs(options.getPkgsDir(), options)
|
||||||
for x in pkgs.items():
|
for x in pkgs.items():
|
||||||
let
|
let
|
||||||
|
|
@ -641,6 +641,8 @@ proc listInstalled(options: Options) =
|
||||||
var s = h[pName]
|
var s = h[pName]
|
||||||
add(s, pVer)
|
add(s, pVer)
|
||||||
h[pName] = s
|
h[pName] = s
|
||||||
|
|
||||||
|
h.sort(proc (a,b: auto): int = cmpIgnoreCase(a[0],b[0]))
|
||||||
for k in keys(h):
|
for k in keys(h):
|
||||||
echo k & " [" & h[k].join(", ") & "]"
|
echo k & " [" & h[k].join(", ") & "]"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue