JuliaGraphics / Winston.jl

2D plotting for Julia
MIT License
171 stars 55 forks source link

load .Winston.ini from home directory #239

Open esheldon opened 9 years ago

esheldon commented 9 years ago

Currently only the site-wide config, that in the CWD, and things in LOAD_PATH are looked for. It would be nice to look for a "dot" file in the home directory as well.

I would submit a pull request but I have not yet grokked how to develop Pkgs in julia

mvkma commented 8 years ago

I think this would be easily possible by adding homedir() here, maybe like so:

for dir in ["."; homedir(); Pkg.dir(); LOAD_PATH]
    fn = joinpath(dir, "Winston.ini")
    if isfile(fn) break end
    fn = joinpath(dir, "Winston", "src", "Winston.ini")
    if isfile(fn) break end
end

I'm not sure about the order though. I guess the file in the home directory should take precedence over the one shipped with the package and the site wide one, but what about the one in CWD?