On "Linux Mint 16 Petra" i type this command :
zenity --list --column "test" a b c
I select the item 'a', then the returnning value is randomly
a or a|a
How do you explain this ? is it a zenity bug ? How to get only 'a' ?
Regards.
On "Linux Mint 16 Petra" i type this command :
zenity --list --column "test" a b c
I select the item 'a', then the returnning value is randomly
a or a|a
How do you explain this ? is it a zenity bug ? How to get only 'a' ?
Regards.
It is a pretty annoying bug. Not the first one this year too.
open=$(find "${@}" -iname "$string" | zenity --list --title "Search results" --text "Please select file or directory to open:" --width 800 --height 600 --column "Files")
opens=$(echo $open | cut -d "|" -f2)
When you select "a" with mouse double click (or with the enter key on keyboard), the value is "a|a". When you select it and press "Ok", the value is "a". I don't know exactly why.
A simple workaround could be :
TMP=$(zenity --list --column "test" a b c) # Save the returned value in TMP
VAL=${TMP:0:1} # Keep the first character of TMP and put it in VAL
echo $VAL # VAL = "a", "b" or "c"
Print every value in a |
separated list : zenity --list --print-column=ALL
(...) and get the whole selected row.