Skip to content

Commit

Permalink
Pkg REPL: sort commands within each super-spec
Browse files Browse the repository at this point in the history
instead of globally when displaying help.
  • Loading branch information
fredrikekre committed Jan 11, 2019
1 parent adb3925 commit 8cabd59
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/REPLMode.jl
Original file line number Diff line number Diff line change
Expand Up @@ -779,16 +779,16 @@ end

function canonical_names()
names = String[]
# add "package" commands
packagecmds = [spec.canonical_name for spec in unique(values(super_specs["package"]))]
append!(names, sort!(packagecmds))
# add other super commands, e.g. "registry"
for (super, specs) in pairs(super_specs)
super == "package" && continue # skip "package"
for spec in unique(values(specs))
push!(names, join([super, spec.canonical_name], "-"))
end
end
for spec in unique(values(super_specs["package"]))
push!(names, spec.canonical_name)
supercmds = [join([super, spec.canonical_name], "-") for spec in unique(values(specs))]
append!(names, sort!(supercmds))
end
return sort!(names)
return names
end

function complete_installed_packages(options, partial)
Expand Down

0 comments on commit 8cabd59

Please sign in to comment.