unify logic for finding by name fragment
bash-completion: detect devtype via -t