Add an environment variable to control the config path.
Not everyone wants to use Mac OS's default config path "~/Library/Preferences/" as returned by go-paths.
This patch includes the environment variable GLOW_CONFIG_HOME to set, so Mac OS users don't have to run glow --config ~/.config/glow/glow.yml or something like that.
If you set the config variable, it is used, if not, the original flow is used.
Oh, and a small spelling error fix.
This will close this issue.
I would love to see this approved. I consolidate my dotfiles on macos all to ~/.config.
Additionally it might be worth respecting the XDG_CONFIG_HOME environment variable by default which would help glow use the user's preferred config directory more accurately without requiring GLOW_CONFIG_HOME to be set.
I didn't check at glow code for now, but I expect it to use
https://pkg.go.dev/os#UserConfigDir
https://cs.opensource.google/go/go/+/refs/tags/go1.22.4:src/os/file.go;l=509
So you would like to overload it when the XDG_CONFIG_HOME env variable is present?