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

Support searching account name, too #167

Open
kgrossjo opened this issue Aug 13, 2024 · 4 comments
Open

Support searching account name, too #167

kgrossjo opened this issue Aug 13, 2024 · 4 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@kgrossjo
Copy link

I have multiple email accounts, and the most common use for switching folders is to switch to the corresponding inbox folder. But I have not found a way to include the account name in the search string.

I even made my account names really short (E, G, S, X are the shortest ones) and I was hoping to be able to enter something like g/i or g inb or inb g or inb/g to go to the inbox folder of the G account.

I have nine accounts and so the current way to go is to enter something like inb and then hit cursor down the right number of times (which will be a different number of times each time).

@kewisch kewisch added enhancement New feature or request good first issue Good for newcomers labels Aug 21, 2024
@kewisch
Copy link
Owner

kewisch commented Aug 21, 2024

This sounds useful, maybe with an option to turn on/off.

if (lowerSearchTerm) {
let searchWords = lowerSearchTerm.split(/\s+/);
for (let item of this.allItems) {
let itemText = this.getItemText(item).toLowerCase();
let mismatch = false;
for (let word of searchWords) {
if (word && !itemText.includes(word)) {
mismatch = true;
break;
}
}
is a good place to start looking.

@micz
Copy link
Contributor

micz commented Jan 20, 2025

It could be extended what has be done in #200, adding the account name to the path string.
However, with only one letter account names I suspect it could not be so useful without some kind of character like / that triggers the account search.
So another way is to use something like /accountname to search for the account and do not add the account name to the path string.
@kewisch what do you prefer?

@kewisch
Copy link
Owner

kewisch commented Feb 8, 2025

I think this could be done on the user side. If they name their account "Remote Folder" then "rem foo" could work. If they want to go with one letter accounts they could do "r/" as the account name, so that "r/ foo" would match. On our end we could simply have a checkbox to also search for account then.

@micz
Copy link
Contributor

micz commented Feb 9, 2025

Ok, I'll make a PR to search also for the account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants