Open qwitwa opened 11 years ago
Seems worth doing, but not urgent
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.
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.
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.