I want a complete list of functions in the Base module. What should I do?
names(Base)
or
function list_functions()
fncs = filter( x -> isa(getfield(Base, x), Function), names(Base))
for (i, fn) in pairs(fncs)
println(fn)
if (mod(i, 10)) == 0
println("Press enter to continue...")
readline()
end
end
end
If you are in the REPL, then typing Base.
and hitting the “Tab” key will also display them.
(But this and names(Base)
will give you other variables and constants as well)
If you’re only interested in functions and types that appear in the documentation, there’s a file “Julia.toml.zip” at Inventory File Repository · JuliaDocs/DocumenterInterLinks.jl Wiki · GitHub which (after you unzip it) you can inspect with your text editor, the standard-library TOML
module, or the DocInventories
package
julia> names(Base)
967-element Vector{Symbol}:
:!
:!=
:!==
:%
â‹®
:⊻
:⊼
:⊽
How to show the list completely?
println.(names(Base));
And with the items numbered to help while scrolling:
foreach(println, pairs(names(Base)))
The TerminalPager package is also good at handling multi-page results. I particularly like the less known commandline mode that can be activated by typing |
as the first character on a line, whereafter you can scroll with the usual arrow, PageDown etc keys and quit with q
.