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.
Currently, the code for parsing command-line options and the
BEMENU_OPTS
environment variable lives inclient/common/common.c
. As such, it is not part of the bemenu library and programs building on the bemenu library which want to supportBEMENU_OPTS
(e.g. to ensure a consistent look of spawned bemenu interfaces) need to duplicate this option parsing logic. As an example, consider theoptions.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?