I have the following twenty-six files in a folder:
$ ls
a.txt c.txt e.txt g.txt i.txt k.txt m.txt o.txt q.txt s.txt u.txt w.txt y.txt
b.txt d.txt f.txt h.txt j.txt l.txt n.txt p.txt r.txt t.txt v.txt x.txt z.txt
$
I can use Zenity like this:
zenity --list --title=Test --width=275 --height=400 --column="File names" *.txt
and get this interface initially:
If I want to select a file lower down the list, say, r.txt
, I press r and r.txt
is selected.
However, if I use Yad instead of Zenity like this:
yad --list --title=Test --width=275 --height=400 --column="File names" *.txt
pressing r does nothing. I have to use the arrow keys to scroll through the list until I come to r.txt
.
My understanding is that Yad has more features than Zenity. So is there some way to get Yad to do what Zenity does?
(Tested using the repository versions of Yad and Zenity found in 18.04 and 19.10.)
For learning
yad
I found this great reference: YAD - Smokey01.comAs mentioned in comments you want to use the option
--search-column=N
Take the following code snippet as an example:
Columns #3 and #5 are hidden but they are still counted. We want to search on Icon Name so it is column #4 as recorded here:
The short
.gif
clip below shows what happens when we type: