[lug] bash compgen -- was Re: fvwm: was virtual screens on gnome?

Jed S. Baer blug at jbaer.cotse.net
Mon Feb 12 19:57:20 MST 2018


On Mon, 12 Feb 2018 19:53:28 -0500
Steve Litt wrote:

> Dmenu 4.5 and earlier used only the old style fonts (listed by
> xfontsel). 4.6 and newer use only the new style (listed by fc-list).
> The newer fonts are MUCH easier to deal with: If your distro bestows
> 4.5 or below, grab the latest (I think 4.7) from Suckless Tools and
> compile.
> 
> To get the feel for what dmenu does, make file with temp.tmp three lines
> containing the words one, two, and three. Then do the following:
> 
> cat temp.tmp | dmenu -l 20

Thanks for the pointers. In particular:
compgen -c | sort -ui | dmenu.xft -fn 'Lucida-12'
works quite well, and on a fast machine, there isn't any lag in
generating that list on the fly with compgen.

compgen, BTW, is interesting, and the only complaint I have is that that
invocation includes shell builtins, such as "[[", and I'm not sure how
best to filter those out. Even a regex calling for "starts with class
alphanumeric" wouldn't get rid of all the builtins.


More information about the LUG mailing list