-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configuration file path #170
Comments
@erroneousboat Is this a feature you'd merge if a PR was submitted? |
@jrwrigh Excellent, thanks for that info. |
Rather than assuming a configuration file at `~/.slack-term`, respect the user's choice per the XDG Base Directory specification (https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) to find the configuration. Uses a cross-platform XDG library to abstract the details of the specification and encompass any future changes (https://github.com/OpenPeeDeeP/xdg, https://godoc.org/github.com/OpenPeeDeeP/xdg). After merging, the [wiki home page](https://github.com/erroneousboat/slack-term/wiki) should be updated to reflect the new configuration location. This closes jpbruinsslot#170 and closes jpbruinsslot#203.
Reference #203 |
Ok, at the moment I don't see the merit of using XDG Base Directories other that a "clean" home directory. I'll have a look at the links provided here, but seeing from the PR needing to have additional knowledge of XDG Base Directory Specification, and explicitly setting it doesn't really seem that of an improvement. I'd rather have it as is, with the option to specify from the command line where the config file is. |
Please do at least skim the spec and/or some of the justifications for it to understand why this is a win for everybody. Implementing the spec costs nothing from either a user's or a maintainer's perspective, and has many benefits.
There is no assumption that users have ever heard of the specification, and no requirement for them to explicitly configure anything. The specification provides sensible defaults for the case where the variables aren't set, which will be most of the time. Users who don't know what the spec is will have their files stored in reasonable locations (and may come away with the experience that Linux[0] is fairly consistent and predictable, rather than the common impression upon new users that it's chaotic and hard to make sense of). Users who are aware of the spec and are fine with the defaults won't have to set anything. People with special use cases where they want to specify particular paths (a small minority of users) can set the environment variables accordingly. Without following the spec, none of those users would likely guess that As for tangible benefits, here are a couple off the top of my head:
[0] Or, in this case, whatever OS they're using. One reason that the |
Alright, thanks I'll have a look |
Reopening issue, not yet merged. |
Rather than assuming a configuration file at `~/.slack-term`, respect the user's choice per the XDG Base Directory specification (https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) to find the configuration. Uses a cross-platform XDG library to abstract the details of the specification and encompass any future changes (https://github.com/OpenPeeDeeP/xdg, https://godoc.org/github.com/OpenPeeDeeP/xdg). After merging, the [wiki home page](https://github.com/erroneousboat/slack-term/wiki) should be updated to reflect the new configuration location. This closes #170 and closes #203.
Please consider looking the configuration file not only in ~ but also in ~/.config/slack-term/config (or even change it to this path)
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
https://unix.stackexchange.com/questions/312988/understanding-home-configuration-file-locations-config-and-local-sha
The text was updated successfully, but these errors were encountered: