1

Does yad support an array sent as an argument to the ComboBox field?

Example:

yad --form --field="ComboBox:CB" One\!Two\!Three

Can I make it work with an array?

array=(one two three)
yad --form --field="ComboBox:CB" $array
oguz ismail
  • 1
  • 16
  • 47
  • 69
  • Duplicate of [Converting a Bash array into a delimited string](https://stackoverflow.com/questions/13470413/converting-a-bash-array-into-a-delimited-string) – oguz ismail May 19 '20 at 13:27

1 Answers1

2

yad does not support array as input for ComboBox natively. You'll have to convert your array to a ! separated string.

You can do this by temporarily modifying your IFS variable, like so :

array=(one two three)
yad --form --field="ComboBox:CB" $(IFS=! ; echo "${array[*]}")
Aserre
  • 4,916
  • 5
  • 33
  • 56