The select() method returns -1 if the user input is not in options.
Currently it does not permit to recover the original input and does not allow to use rofi as a free text prompt while providing input suggestions (I may be wrong, if so please correct me :grin: ).
It may be useful to allow arbitrary user inputs while providing optional default values.
I thought of 2 ways of doing it :
The text_entry() method could support optional arg options (default=[] to ensure backward compatibility).
Creating a new method select_flex() returning index, key, user_input or user_input, key
I can submit a PR if you tell me what way suits you.
The
select()
method returns-1
if the user input is not inoptions
. Currently it does not permit to recover the original input and does not allow to use rofi as a free text prompt while providing input suggestions (I may be wrong, if so please correct me :grin: ).It may be useful to allow arbitrary user inputs while providing optional default values. I thought of 2 ways of doing it :
text_entry()
method could support optional argoptions
(default=[] to ensure backward compatibility).select_flex()
returningindex, key, user_input
oruser_input, key
I can submit a PR if you tell me what way suits you.
PS : thanks for the module, it made my day.