On Terminal do:
selectinfinder.rb *pattern*
so a list of glob expanded item names in the directory is produced
This files are added to the selected ones in the top most window only when both coincide (the window for the first arg and the window with the selected items)
If no items were selected, only the Terminal arg files will be