unify zsh+bash shell config; fix zsh startup

Support either shell as the login shell via stow selection (merges the
bashed branch in). shell/ holds shared POSIX env + interactive config;
each shell loads its own rc natively.

- zsh: add .zshenv (sets ZDOTDIR+env early), rename rc -> .zshrc, add
  login-only .zprofile (pyenv --path)
- bash: add ~/.bash_profile + ~/.bashrc stubs, .config/bash/{rc,prompt}
- shell: profile is POSIX env-only (no zsh-rc source); path rewritten
  POSIX + idempotent (flat ~/.local/bin, no subdir recursion); new
  interactive sources aliases/functions + pyenv shims
- drop dead shell/.zprofile symlink; move ZDOTDIR out of exports

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-26 17:46:10 +02:00
parent a6a3d3a759
commit 9262c9795a
12 changed files with 236 additions and 20 deletions
+5
View File
@@ -0,0 +1,5 @@
#!/bin/sh
# zsh login shell only. PATH-level init that belongs to login (pyenv shims dir).
# PYENV_ROOT is exported earlier in ~/.config/shell/exports.
command -v pyenv >/dev/null 2>&1 && eval "$(pyenv init --path)"
@@ -1,6 +1,10 @@
# Luke's config for the Zoomer Shell
# Source (mainly): https://github.com/LukeSmithxyz/voidrice/
# Shared interactive config (aliases, functions, pyenv shims):
[ -r "${XDG_CONFIG_HOME:-$HOME/.config}/shell/interactive" ] && \
. "${XDG_CONFIG_HOME:-$HOME/.config}/shell/interactive"
# Enable colors and change prompt:
autoload -U colors && colors # Load colors
PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b "
+13
View File
@@ -0,0 +1,13 @@
#!/bin/sh
# Read first by zsh for EVERY shell (login or not), so this is the only place
# ZDOTDIR can be set early enough to redirect where zsh looks for its rc files.
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
# Shared POSIX environment (idempotent):
for _name in path exports; do
_file="$XDG_CONFIG_HOME/shell/$_name"
[ -r "$_file" ] && . "$_file"
done
unset _name _file