Skip to content

Comments

mdfind commands fixed#2053

Merged
Theile merged 3 commits intomainfrom
Fixing-`mdfind`-commands
Jan 26, 2025
Merged

mdfind commands fixed#2053
Theile merged 3 commits intomainfrom
Fixing-`mdfind`-commands

Conversation

@Theile
Copy link
Collaborator

@Theile Theile commented Dec 2, 2024

We have to specify the kind in the query more precisely to make sure it only finds applications. And now it's not Application, but App.

This will find apps only:

mdfind -name "$name" 'kMDItemKind:"App"'

@Theile Theile added the bug-fix label Dec 2, 2024
@Theile Theile added this to the v10.7 milestone Dec 2, 2024
@Theile Theile requested a review from scriptingosx December 2, 2024 09:03
We have to use other fields that are not localized in both kind and name:
```
mdfind 'kMDItemContentType:com.apple.application AND kMDItemFSName:"'"$name"'"'
```
@Theile
Copy link
Collaborator Author

Theile commented Dec 2, 2024

Updated with use of other fields that are not localized in both kind and name:

mdfind 'kMDItemContentType:com.apple.application AND kMDItemFSName:"'"$name"'"'

@Theile
Copy link
Collaborator Author

Theile commented Dec 2, 2024

Better quoting applied:

mdfind "kMDItemContentType:com.apple.application AND kMDItemFSName:\"$name\""

@scriptingosx scriptingosx modified the milestones: v10.7, v10.8 Jan 24, 2025
@Theile Theile merged commit 522c63c into main Jan 26, 2025
@Theile Theile deleted the Fixing-`mdfind`-commands branch January 26, 2025 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants