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

Move command-line option parsing code to the library #388

Open
nmeum opened this issue Feb 25, 2024 · 1 comment
Open

Move command-line option parsing code to the library #388

nmeum opened this issue Feb 25, 2024 · 1 comment

Comments

@nmeum
Copy link
Contributor

nmeum commented Feb 25, 2024

Currently, the code for parsing command-line options and the BEMENU_OPTS environment variable lives in client/common/common.c. As such, it is not part of the bemenu library and programs building on the bemenu library which want to support BEMENU_OPTS (e.g. to ensure a consistent look of spawned bemenu interfaces) need to duplicate this option parsing logic. As an example, consider the options.c file from pinentry-bemenu. In order to avoid this code duplication, I want to propose moving parts of the command-line option parsing logic to the bemenu library to allow its re-use.

Thoughts?

@Cloudef
Copy link
Owner

Cloudef commented Feb 25, 2024

There is wip code here that should be upated https://github.com/Cloudef/bemenu/tree/wip-argument-parsing-in-library

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

No branches or pull requests

2 participants