I found by chance it was possible to display a combo box with zenity (version tested: 2.32.1). See the following code:
#!/bin/bash
array=(a b c d e)
value=$(zenity --entry --title "Window title" --text "${array[@]}" --text "Insert your choice.")
The result is illustrated with the following 3 images:
I have two questions about that:
Is there a documentation about this functionality? I didn't find anything in the zenity documentation.
Why the first value of my array doesn't appear in the combo box? In the example above, my array is
(a b c d e)
, and the combo box only displaysb c d e
.As a workaround, I add a value in my array, for example
(0 a b c d e)
.