Skip to content

Commit

Permalink
45655: _retrieve_mac_apps: Update for recent macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
okdana committed Apr 6, 2020
1 parent 05b1536 commit c70d734
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2020-04-05 dana <dana@dana.is>

* 45655: Completion/Darwin/Type/_retrieve_mac_apps: Update
search paths and Spotlight index check for recent macOS

2020-04-05 Daniel Shahaf <d.s@daniel.shahaf.name>

* 45656: Etc/BUGS: Document the -o emacs segfault bug.
Expand Down
7 changes: 5 additions & 2 deletions Completion/Darwin/Type/_retrieve_mac_apps
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ _retrieve_mac_apps() {
typeset retrieve
if ! zstyle -s ":completion:*:*:${service}:commands" search-method retrieve
then
if [[ -d /.Spotlight-V100 ]]; then
if [[ "$( command mdutil -s / 2>&1 )" == *enabled* ]]; then
# / is indexed to use Spotlight
retrieve=_mac_apps_spotlight_retrieve
else
Expand All @@ -88,7 +88,10 @@ _retrieve_mac_apps() {
if ! zstyle -a ":completion:${curcontext}:" application-path app_dir_root
then
if [[ $retrieve = _mac_apps_old_retrieve ]]; then
app_dir_root=( {,/Developer,/Network,"$HOME"}/{Applications*(N),Desktop} )
app_dir_root=(
{,/Developer,/Network,/System,$HOME}/{Applications*(N),Desktop}
)
app_dir_root=( $^app_dir_root(N) )
else
app_dir_root=( / )
fi
Expand Down

0 comments on commit c70d734

Please sign in to comment.