Skip to content

Commit

Permalink
Merge #986
Browse files Browse the repository at this point in the history
986: Pkg REPL: sort commands within each super-spec r=fredrikekre a=fredrikekre

Sort commands within each super-spec instead of globally when displaying help.



Co-authored-by: Fredrik Ekre <ekrefredrik@gmail.com>
  • Loading branch information
bors[bot] and fredrikekre committed Jan 11, 2019
2 parents 6b0f962 + 8cabd59 commit d480435
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 d480435

Please sign in to comment.