Skip to content

Restructure shell config into shared.sh#15

Open
akan72 wants to merge 1 commit into
akan72/zshrc-cleanupfrom
akan72/shell-restructuring
Open

Restructure shell config into shared.sh#15
akan72 wants to merge 1 commit into
akan72/zshrc-cleanupfrom
akan72/shell-restructuring

Conversation

@akan72
Copy link
Copy Markdown
Owner

@akan72 akan72 commented May 29, 2026

Summary

Branch 3 of the dotfiles cleanup (stacked on akan72/zshrc-cleanup). Extracts the shared shell config into a single shared.sh.

  • Extract shared aliases, exports, and PATH into shared.sh (single source of truth)
  • Source shared.sh (~/.shared.sh) from both bashrc and zshrc, instead of sourcing bashrc from zshrc
  • Consolidate all static PATH entries (Homebrew, Postgres, yarn, bun, ~/.local/bin) into one block with a _prepend_path dedup helper — prevents PATH ballooning in nested shells (e.g. tmux)
  • Symlink shared.sh~/.shared.sh in assimilate.sh

Why & alternatives (from explanations.txt — Branch 3)

Change Why Alternatives
Extract shared.sh One file for what both shells need (aliases, exports, PATH). Avoids the "source bashrc from zshrc" hack. Use a dotfile framework like chezmoi/yadm (heavier).
Consolidate PATH into one block with dedup PATH was appended ~6 times across bashrc + zshrc; in nested shells (tmux) it balloons with duplicates. Skip the dedup helper — optional; a single block already helps.

Base: akan72/zshrc-cleanup. Merge order: Branch 1 → Branch 2 → Branch 3.

- Extract shared aliases, exports, and PATH into shared.sh (single source of truth)
- Source shared.sh (~/.shared.sh) from both bashrc and zshrc instead of
  sourcing bashrc from zshrc
- Consolidate all static PATH entries (Homebrew, Postgres, yarn, bun, ~/.local/bin)
  into one block in shared.sh with a _prepend_path dedup helper, preventing
  PATH from ballooning in nested shells (e.g. tmux)
- Symlink shared.sh -> ~/.shared.sh in assimilate.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant