Skip to content

Instantly share code, notes, and snippets.

Avatar

Miha Zgubic mzgubic

View GitHub Profile
@nickrobinson251
nickrobinson251 / name_search.jl
Last active Jan 22, 2021
A Julia startup.jl config file that creates REPL modes which help you find functionality
View name_search.jl
# Functionality for the `names>` repl mode
using REPL: moduleusings
# search through all accessible names for functionality with a name like `str`
names_like(str) = foreach(println, _corrections(str, _accessible_names()))
function _accessible_names(mod=Main) # Based on code in stdlib
_names(m) = names(m; all=true, imported=true) # include unexported `Base` + `mod` names
mod_names = filter!(s -> !Base.isdeprecated(mod, s), _names(mod))