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

Add new flag --auto-select: when there is only one entry left, automaticallty select it #357

Merged
merged 4 commits into from
Sep 28, 2023

Conversation

gesellkammer
Copy link
Contributor

This PR fixes --accept-single, see #335

@Cloudef
Copy link
Owner

Cloudef commented Sep 27, 2023

I think there's confusion what accept-single is supposed to do. The accept-single is supposed to return immediately if there's only one item in the list, this seems to change the behavior that accept-single returns immediately if filter out the list enough that there remains only one item.

@gesellkammer
Copy link
Contributor Author

gesellkammer commented Sep 27, 2023 via email

@Cloudef
Copy link
Owner

Cloudef commented Sep 27, 2023

Yes that kind of behavior would be a new option

@gesellkammer
Copy link
Contributor Author

Would you accept a patch which implements that functionality under the flag "--accept-single", mirroring rofi's own option?

@Cloudef
Copy link
Owner

Cloudef commented Sep 28, 2023

That would break the current expected behavior of --accept-single, patch with different flag name is okay.

@Cloudef
Copy link
Owner

Cloudef commented Sep 28, 2023

Optional argument for --accept-single could work too as well I guess, something like "always"

…ect flag:

when there is only one option left during selection it is automatically
selected and the menu exits.
@gesellkammer gesellkammer changed the title fix --accept-single option Add new flag --auto-select: when there is only one entry left, automaticallty select it Sep 28, 2023
@gesellkammer
Copy link
Contributor Author

Reverted the behaviour of --accept-single, added a new flag --auto-select

@Cloudef
Copy link
Owner

Cloudef commented Sep 28, 2023

Can you also document the flag in the man page, looks good otherwise

@gesellkammer
Copy link
Contributor Author

Thanks

@Cloudef
Copy link
Owner

Cloudef commented Sep 28, 2023

Looks like we hit string length limit:

error: string literal of length 4104 exceeds maximum length 4095 that ISO C99 compilers are required to support

@Cloudef
Copy link
Owner

Cloudef commented Sep 28, 2023

Thanks

@Cloudef Cloudef merged commit a04dea3 into Cloudef:master Sep 28, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants