Both works fine, but in terms of speed strangely enough same as op, though i think string comparison is just in general faster for bash than catching result of $?
btw you've meant ==, instead of = i suppose please edit original message, so nobody will catch this typo
I'm experimenting with pacman -Ss now, it's fast but i'm a little concerned that it search for keywords like google, there is a chance that it can catch some part of package name from AUR in manjaro repos, so doesn't seem to be reliable...
trizen is cool option no doubt, but in my case i'd like to stick with something preinstalled like pacman (which is something that all Manjaro editions have)
I really can't grasp the point of the script.
It's fate of all of my isolated bash-related questions
All i can say - definitely not typical scenario use case.