linux-directory-help icon indicating copy to clipboard operation
linux-directory-help copied to clipboard

Include information on XDG folders

Open qwitwa opened this issue 11 years ago • 3 comments

Including information/explanation about folders from the XDG specification would be helpful.

The complication is that since those folders are defined by environment variables, the current approach of testing the directory by regular expression on a preset list of directories isn't going to work.

If the target audience of this program is mainly new users, this could probably be ignored, and help strings for the defaults such as "~/.local/share" could be hard-coded into the program.

qwitwa avatar May 22 '13 22:05 qwitwa

Seems worth doing, but not urgent

jrenner avatar May 23 '13 15:05 jrenner

latest commit moved from regex to map based directory info. now it will be simple to get the XDG environment variables, and add their info to the map.

jrenner avatar May 24 '13 08:05 jrenner

Nice. I might go learn Go and do it myself. If this is still open by the time I get round to that I'll send you a pull request.

I cloned the project in python for fun here, and got environment variables working by splitting the helpstring into lines and checking the first character of each line to figure out what the line means, then using the python standard library's os.path to expand variables.

qwitwa avatar May 24 '13 21:05 qwitwa