[zed] Update config

This commit is contained in:
Andrew Williams
2026-01-07 17:22:17 +00:00
parent 9b7b7996eb
commit 5069d92f3f
3 changed files with 14 additions and 7 deletions

View File

@@ -1,9 +1,14 @@
# Zed specific shell configuration
# Detect Zed installation in common locations
for zed_path in "$HOME/Applications/Zed.app" "/Applications/Zed.app"; do
if [ -d "$zed_path" ]; then
alias zed="$zed_path/Contents/MacOS/cli"
break
fi
done
# Rather than installing or linking the Zed CLI, we define a function that
# locates the Zed application and invokes its CLI directly.
function zed() {
for zed_path in "$HOME/Applications/Zed.app" "/Applications/Zed.app"; do
if [ -d "$zed_path" ]; then
"$zed_path/Contents/MacOS/cli" "$@"
return
fi
done
echo "Zed application not found in common locations."
return 1
}