You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Default to ~/.config/gmailctl for newly created config dirs. (#455)
* Default to ~/.config/gmailctl for newly created config dirs.
This is a minimal fix for #144
It is a revision of #393 and uses a library for the internal XDG path calculation per feedback there.
* Update cmd/gmailctl/cmd/root_cmd.go
Co-authored-by: Michele Bertasi <405934+mbrt@users.noreply.github.com>
* Update README.md
---------
Co-authored-by: Michele Bertasi <405934+mbrt@users.noreply.github.com>
The easiest way to use gmailctl is to run `gmailctl edit`. This will open the
139
-
local `.gmailctl/config.jsonnet` file in your editor. After you exit the editor
140
-
the configuration is applied to Gmail. See[Configuration](#configuration) for
141
-
the configuration file format. This is the preferred way if you want to start
142
-
your filters from scratch.
140
+
local config file in your editor. After you exit
141
+
the editor the configuration is applied to Gmail. See
142
+
[Configuration](#configuration) for the configuration file format. This is the
143
+
preferred way if you want to start your filters from scratch.
143
144
144
145
**NOTE:** It's recommended to backup your current configuration before you apply
145
146
the generated one for the first time. Your current filters will be wiped and
146
147
replaced with the ones specified in the config file. The diff you'll get during
147
148
the first run will probably be pretty big, but from that point on, all changes
148
149
should generate a small and simple to review diff.
149
150
151
+
### Config directory
152
+
153
+
Configuration and credentials are in either:
154
+
155
+
-`<XDG_BASE_DIR>/gmailctl` (using the [XDG base directory spec](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html), commonly `~/.config/gmailctl` on Linux.
156
+
-`~/.gmailctl`: The previous default location. If the directory exists `gmailctl` will continue to use it for backward compatibility
157
+
- Custom location: use the `--config` argument.
150
158
### Migrate from another solution
151
159
152
160
If you want to preserve your current filters and migrate to a more sane
@@ -164,7 +172,8 @@ Example of usage:
164
172
165
173
```bash
166
174
# download the filters to the default configuration file
0 commit comments