

PCRE is so much easier to use for the exact pattern matching I often need that I neglect regular Regex most of the time. I have tried to leave out any features that require new versions or modules except for PCRE. Zsh is simple, strait-forward syntax compared to some other sh-compatible shells. I hope that as an example it works for you, but if the idea is not quite right, we could tweak it a bit.

I have not tested this script - I just wrote it on the fly to answer your question. Some apps set their names deeper in the scripts - I don't know why! You may have to re-write or add to a script like this one to search ".desktop" files in ~/.local/share/applications for their '^NAME=.' equivalent to the above, and then get the execution command there. Please use Exact, case-sensitive spelling."

Setopt rematchpcre # recommended, I'm so used to PCRE, I sometimes forget what doesn't work in RegexĬhrome_Profile=Default # or "Profile 1". You can do the parsing yourself, however, with a script that searches and extracts the name of each extension/app until it finds the name you search for: /usr/local/bin/chrome-app-by-name:Įmulate -R zsh -o extendedglob -o nullglob Providing this feature would mean unreliable extra parsing for installed apps and some would consider it a security flaw. Unfortunately, no there is no way provided to call an app at the command line by it's name.
