From e6e73f3b51852d4e224991e2c1281d7485587533 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Thu, 8 Jan 2026 09:56:33 +0000 Subject: [PATCH] [macos] Add some useful helper functions --- macos/.config/shell-common/99_macos.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/macos/.config/shell-common/99_macos.sh b/macos/.config/shell-common/99_macos.sh index 97be293..5f01405 100644 --- a/macos/.config/shell-common/99_macos.sh +++ b/macos/.config/shell-common/99_macos.sh @@ -125,3 +125,15 @@ if [ -d "/Applications/Tailscale.app" ]; then alias tailscale="/Applications/Tailscale.app/Contents/MacOS/Tailscale" alias ts="/Applications/Tailscale.app/Contents/MacOS/Tailscale" fi + +# Open the finder to a specified path or to current directory. +# https://natelandau.com/my-mac-os-zsh-profile/ +f() { + open -a "Finder" "${1:-.}" +} + +# Search for a file using macOS Spotlight +# https://natelandau.com/my-mac-os-zsh-profile/ +spotlight() { + mdfind "kMDItemDisplayName == '${1}'wc" +}