Skip to content
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

Ability to synchronize multiple accounts at once #7

Open
codethief opened this issue Sep 18, 2024 · 3 comments
Open

Ability to synchronize multiple accounts at once #7

codethief opened this issue Sep 18, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@codethief
Copy link

The title says it all. :)

Speaking of defaults, I learned the above through experimenting. So far it seem it's not really documented what exactly default = true does(?)

Side side note: If you accidentally set default = true for several accounts, neverest synchronize seems to randomly pick one of those accounts with every call(?)

@codethief codethief changed the title Have neverest synchronize sync all accounts when no account has default = true [Feature request] Have neverest synchronize sync all accounts when no account has default = true Sep 18, 2024
@soywod
Copy link
Member

soywod commented Sep 19, 2024

Commands doctor, configure and synchronize take an optional account name as parameter. If you don't give one, they will take the first account found with default = true.

If you accidentally set default = true for several accounts, neverest synchronize seems to randomly pick one of those accounts with every call(?)

I would not be surprised, because it uses a hash map internally (which does not keep order). It could be better to throw an error in case multiple accounts are set as default.

Regarding your initial request, I would rather introduce a new flag --all:

  • neverest sync synchronizes the (unique) default account
  • neverest sync example synchronizes account example
  • neverest sync example1 example2 synchronizes accounts example1 and example2
  • neverest sync --all synchronizes all accounts

What do you think?

@soywod soywod changed the title [Feature request] Have neverest synchronize sync all accounts when no account has default = true Ability to synchronize multiple accounts at once Sep 19, 2024
@soywod soywod added the enhancement New feature or request label Sep 19, 2024
@soywod soywod added this to Pimalaya Sep 19, 2024
@codethief
Copy link
Author

What exactly is the use case for default=true? Is there really a case where I have multiple accounts, don't want to sync all of them, and also don't know / don't want to specify the name on the command line of the account I want to sync?

@soywod
Copy link
Member

soywod commented Sep 20, 2024

What exactly is the use case for default=true? Is there really a case where I have multiple accounts, don't want to sync all of them, and also don't know / don't want to specify the name on the command line of the account I want to sync?

My use case is a perfect example (and I believe it will be the case for most of people). I have a main account at Posteo which I daily use. I set default = true. All my commands do not require --account posteo. I also have secondary accounts (either work account or old personal account like Gmail), which I don't use every day. When I want to use them, I need to put the --account gmail.

I also use the Emacs plugin. When I spawn the interface, it shows me envelopes from my main account. If I need to check another account, then I need to switch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

2 participants