Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Perform zsh / spotlight / application completion' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Perform zsh / spotlight / application completion
Authored by: bpm on Nov 23, '05 08:24:10AM
Since -a searches for the Application the full pathnames can be shortened to just the Application name. For example:

$ typeset -a _apps
$ _apps=(${(f)"$(mdfind "kMDItemKind == 'Application'" | perl -MFile::Basename -pe '$_ = &basename($_, ".app")')"})                                              
$ compctl -f -x 'c[-1,-a]' -k _apps -- open
$open -a W
WMV Player             Windows Media Player


[ Reply to This | # ]
Perform zsh / spotlight / application completion
Authored by: Stereo on Nov 24, '05 06:55:41PM
For some reason, this doesn't work for me:

% _apps=(${(f)"$(mdfind "kMDItemKind == 'Application'" | perl -MFile::Basename -pe '$_ = &basename($_, ".app")')"}) 
zsh: unknown sort specifier


[ Reply to This | # ]
Perform zsh / spotlight / application completion
Authored by: bpm on Nov 27, '05 08:00:07PM
Only thing I can think of is the version. I have:

$ zsh --version
zsh --version
zsh 4.2.3 (powerpc-apple-darwin8.0)


[ Reply to This | # ]