Closed Skabit closed 3 years ago
Interesting, thanks for reporting. Just to confirm, the content you show there is from skabit/.config/eg/egrc
, right?
Do you have an old config file at ~/.egrc
maybe that is getting picked up first?
This issue happens with a fresh installation, I don't have never used eg
.
the content you show there is from skabit/.config/eg/egrc, right?
That's right. For now I only want have a custom directory.
I've tested to move the egrc
file to home folder (~/.egrc
) and works. So the application ignores the other path: ~/.config/eg
Do you have XDG_CONFIG_HOME
set as an environment variable? Can you run echo $XDG_CONFIG_HOME
and report what it says?
The XDG spec says it should default to $HOME/.config
, but we're leaving it up to the user to enforce the default.
If you do have it set but eg
isn't picking it up then I'll have to do some more digging.
When I run echo $XDG_CONFIG_HOME
the output is empty, but this situation is ok, from freedesktop.org:
$XDG_CONFIG_HOME defines the base directory relative to which user specific configuration files should be stored. If $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config should be used.
So my config file is ~/.config (remember ~ = $HOME). I use $XDG_CONFIG_HOME because is a standard, is a good news to know than eg
use that path for its config file. Maybe python is ignores the path, I don't know.
Interesting, it looks like I implemented that incorrectly then. It's not python's fault, it's mine. Fortunately it should be an easy fix. For now, you can either put it in the non-XDG location (~/.egrc
), or you can set XDG_CONFIG_HOME
in your rc files.
Thanks for catching that and for the reference links. Since there's a relatively painless workaround, I'll try to have a fix out within a couple weeks.
Just published v1.2.1 with the fix. Run pip install --upgrade eg
to grab it.
If you still aren't seeing the behavior you want, please let me know. Seems to look good in all of my testing.
Thanks again for pointing it out!
Wow, thanks @srsudar. Today I updated and voilà, now eg
follows the XDG_CONFIG_HOME
path.
By the way, great work and useful app, now I test it and spread the word.
Version: 1.2.0 Installed from pip
I follow the information on README of the repository. For custom config file I create a file called
egrc
on the next path:skabit/.config/eg
, but nothing happens. In this file I only add a custom directory with my examples: