Skip to content

Default to ~/.config/gmailctl for newly created config dirs#393

Closed
lgarron wants to merge 2 commits into
mbrt:masterfrom
lgarron:config-dir
Closed

Default to ~/.config/gmailctl for newly created config dirs#393
lgarron wants to merge 2 commits into
mbrt:masterfrom
lgarron:config-dir

Conversation

@lgarron

@lgarron lgarron commented Mar 21, 2024

Copy link
Copy Markdown

This is a minimal fix for #144

Comment thread cmd/gmailctl/cmd/root_cmd.go Outdated

@mbrt mbrt left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contributions!

There are also a bunch of references to the old directory in the main README.md. Could you update them?

I think the new behavior should also be explained in the gmailctl init --help message. Something along the lines that the default config directory location moved from one location to the other.

Sorry for the back and forth, I missed these points in the earlier review. Thanks!

@mbrt

mbrt commented Mar 23, 2024

Copy link
Copy Markdown
Owner

I thought about this a bit more and the problem with this PR is that it doesn't solve the problem for all platforms. I think the original issue is more about OSX and Windows, where polluting the home directory with dotfiles is not common.

I'm afraid this just introduces one more variant without really tackling the underlying issue.

@lgarron

lgarron commented Mar 23, 2024

Copy link
Copy Markdown
Author

I thought about this a bit more and the problem with this PR is that it doesn't solve the problem for all platforms. I think the original issue is more about OSX and Windows, where polluting the home directory with dotfiles is not common.

I'm afraid this just introduces one more variant without really tackling the underlying issue.

I mean, that's fine if you'd prefer to match OS conventions more closely. How would you feel about using https://github.com/adrg/xdg to compute the config path?

@mbrt

mbrt commented Mar 24, 2024

Copy link
Copy Markdown
Owner

Using adrg/xdg seems better to me. We would make the behavior more complicated, but at the same time behave in a more standard way. I also took a look at the library and it seems well maintained and low dependency.

This should be explained decently in the docs, but I would agree with that change.

@github-actions

Copy link
Copy Markdown
Contributor

This pull request is stale because it has been open for 30 days without activity.
This will be closed in 7 days, unless you add the 'lifecycle/keep-alive' label or comment.

@github-actions github-actions Bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity, has become stale and will be auto-closed. label Apr 24, 2024
@github-actions github-actions Bot closed this May 2, 2024
lgarron added a commit to lgarron/gmailctl that referenced this pull request Jun 16, 2026
This is a minimal fix for mbrt#144

It is a revision of mbrt#393 and uses a library for the internal XDG path calculation per feedback there.
lgarron added a commit to lgarron/gmailctl that referenced this pull request Jun 17, 2026
…tl` is present).

This is a minimal fix for mbrt#144

It is a revision of mbrt#393 and uses a library for the internal XDG path calculation per feedback there.
lgarron added a commit to lgarron/gmailctl that referenced this pull request Jun 17, 2026
This is a minimal fix for mbrt#144

It is a revision of mbrt#393 and uses a library for the internal XDG path calculation per feedback there.
@lgarron

lgarron commented Jun 17, 2026

Copy link
Copy Markdown
Author

Using adrg/xdg seems better to me. We would make the behavior more complicated, but at the same time behave in a more standard way. I also took a look at the library and it seems well maintained and low dependency.

This should be explained decently in the docs, but I would agree with that change.

It's been two years, but I finally got around to this: #455

(I've been using a local build with this PR in the meanwhile.)

lgarron added a commit to lgarron/gmailctl that referenced this pull request Jun 17, 2026
This is a minimal fix for mbrt#144

It is a revision of mbrt#393 and uses a library for the internal XDG path calculation per feedback there.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lifecycle/stale Denotes an issue or PR has remained open with no activity, has become stale and will be auto-closed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants