I'm trying to incorporate YAD into my script to add a more GUI feel to it. (It may end up being written in Python at a later date.) I'm able to use similar code to produce a listbox with selectable items in an earlier part of the code without issue, but this bit is doing my head in.
x=1
for f in "${Basic_Info[@]}" ; do echo " $x $f" ; x=$(( x + 1 )) ; done
album=$(for f in "${Basic_Info[@]}" ; do echo FALSE ; echo "$f" ; done | yad --list \
--center --title="Album selection" --height="$hite" --width="550" --checklist \
--column="Select" --column="Artist - Album to use:" --print-column="2" )
The above produces the following:- Screen output from the echo loop
and: The YAD listbox output
If you cannot see the attached pictures, the problem is:-
The for loop using echo produces the correct output on the screen.
The for loop piped to the YAD list shows incorrect output.
Obviously the variable $hite changes depending upon the number of items in the Basic_Info array, but doesn't affect the incorrect output.
Please can somebody tell me what is going on, as I'm starting to lose my mind over this issue.
Many thanks in advance.
you have & character in song's names. add --no-markup option to yad or filter loop output through sed "s/&/&/g"