feat(mobile): the Mac role, and role-dependent plugins
Looking at the actual machine turned up something the shared plugin list could not express. The Mac loads macos, brew and dotbare; beastix and shron load archlinux. One list filtered by availability - which is what the stub did - would have dropped four plugins on the Mac without a word. Assembly moves into 05-pre-omz.zsh, which knows the role, and the availability filter stays on top of it so a plugin that is not installed still cannot produce a warning at every login. .zprofile is added, and that is the whole point of the mobile role. The Mac sets its PATH in .zshrc, so /opt/homebrew/bin exists for interactive shells and for nothing else: "ssh mac brew --version" comes back empty, which during the design phase was read as Homebrew not being installed. It is installed, with 178 formulae. Homebrew's shellenv belongs in .zprofile and now lives there; the loop is inert on Linux, where neither prefix exists. Carried over from the Mac: the Homebrew auto-update settings and bench(), which runs bench inside the ERPNext compose stack. PYTHONPATH pointed at /usr/lib/python3.9/site-packages there too - a Linux path on macOS, so doubly wrong. All three machines had a variant of that line and none of them is kept. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
39f9d11200
commit
003ba4b390
@@ -0,0 +1,17 @@
|
||||
# Login shells only.
|
||||
#
|
||||
# Homebrew belongs here rather than in .zshrc. .zprofile is read by login
|
||||
# shells, which includes the one behind every terminal window and, importantly,
|
||||
# is the only hook that also covers a plain "ssh host <command>" reliably
|
||||
# enough to matter. Putting brew's PATH in .zshrc leaves it missing from
|
||||
# anything non-interactive, which is how "ssh mac brew --version" came back
|
||||
# empty and was mistaken for Homebrew being absent.
|
||||
#
|
||||
# Harmless on Linux: neither prefix exists there, so the loop does nothing.
|
||||
for _brew in /opt/homebrew /usr/local; do
|
||||
if [[ -x "$_brew/bin/brew" ]]; then
|
||||
eval "$("$_brew/bin/brew" shellenv)"
|
||||
break
|
||||
fi
|
||||
done
|
||||
unset _brew
|
||||
Reference in New Issue
Block a user