I want to display a menu in linux bash using whiptail
When a menu item contains one or more dashes, whiptail fails to show the menu.
Example with only one item:
MQTT_PublisherArgs='-h {host} -t {topic} -m "{{message}}"'
whiptail --title "MQTT Configuration" --menu "" 0 70 0 "Publisher Arguments" "$MQTT_PublisherArgs"
When I replace the dashes with another character e.g. underscore, the menu is shown correctly.
I tried to escape the dashes with \-
but the backslash is shown in the menu.
How can I display the menu item -h {host} -t {topic} -m "{{message}}"
When the user selects this item he will prompted to enter his proper arguments