Consider supporting XDG Base Directory Specification? #454
Replies: 3 comments 4 replies
-
That could work, but I do not agree that when |
Beta Was this translation helpful? Give feedback.
-
Thanks for the reply with details. I have a few questions:
Furthermore, the I'm still worried about making this all more confusing for users. The use of config files differs from other tools in making searches context-sensitive using one or more configs in a working directory, e.g. |
Beta Was this translation helpful? Give feedback.
-
The ugrep v7.3 version source code has a compile-time flag // #define WITH_XDG_CONFIG_HOME When enabled, it checks for I left it out for now, because once enabled I can't go back, which worries me, because it is not entirely clear if this should work with any |
Beta Was this translation helpful? Give feedback.
-
The XDG Base Directory Specification has some rules for specifying where to search for a config file.
It basically means to search for config files in
${XDG_CONFIG_HOME}
(or$HOME/.config
it it's not set), and$XDG_CONFIG_DIRS
(defaulting to/etc/xdg
).Usually, programs define a subdirectory for their config in those directories. For example
~/.config/git/
.I think, it would be nice, if ugrep would support this as well.
.ugrep
to.config/ugrep/config
/etc/xdg/ugrep/config
If ugrep never ever will have more config files, one could also use
~/.config/ugrep.conf
, and/etc/xdg/ugrep.conf
.Beta Was this translation helpful? Give feedback.
All reactions