Refactor shell configuration following prime directive principles
🎯 Comprehensive refinement addressing durability and maintainability: **Modular Architecture:** - environment.zsh: Centralized environment variables with XDG compliance - paths.zsh: Intelligent PATH management with existence checking - aliases.zsh: Enhanced aliases with tool fallbacks and context awareness - functions.zsh: Sophisticated functions with error handling and recovery - .zshrc: Clean main config with graceful degradation **Key Improvements:** - ✅ Fixed PATH duplication and made portable - ✅ Added graceful dependency handling throughout - ✅ Enhanced vault/chamber/work context integration - ✅ Comprehensive error recovery in sysupdate() - ✅ Intelligent tool detection and fallbacks - ✅ Performance optimizations for different shell modes **Philosophy Applied:** - μέτρον (measure): Right amount of features without bloat - συμμετρία (proportion): Balanced modular structure - πρόσφορον (fitting): Portable, maintainable, testable **Testing:** - Syntax validation for all modules - Function loading verification - Isolated test environment - Ready for production deployment 🤖 Generated with Claude Code (https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude
parent
6ce6e7c042
commit
546e43fc64
+6
-12
@@ -40,11 +40,14 @@ link_file() {
|
||||
|
||||
# Shell configurations
|
||||
echo -e "${YELLOW}Linking shell configurations...${NC}"
|
||||
link_file "$DOTFILES_DIR/.zshrc" "$HOME/.zshrc"
|
||||
link_file "$DOTFILES_DIR/shell/.zshrc" "$HOME/.zshrc"
|
||||
link_file "$DOTFILES_DIR/.gitconfig" "$HOME/.gitconfig"
|
||||
link_file "$DOTFILES_DIR/.vimrc" "$HOME/.vimrc"
|
||||
link_file "$DOTFILES_DIR/.npmrc" "$HOME/.npmrc"
|
||||
|
||||
# Link plugin manifest
|
||||
link_file "$DOTFILES_DIR/shell/.zsh-plugins.txt" "$HOME/.zsh-plugins.txt"
|
||||
|
||||
# SSH config (template only - user must customize)
|
||||
if [ -f "$DOTFILES_DIR/ssh/config.example" ] && [ ! -f "$HOME/.ssh/config" ]; then
|
||||
echo -e "${YELLOW}Creating SSH config from template...${NC}"
|
||||
@@ -89,17 +92,8 @@ if [ -f "$DOTFILES_DIR/.mackup.cfg" ]; then
|
||||
link_file "$DOTFILES_DIR/.mackup.cfg" "$HOME/.mackup.cfg"
|
||||
fi
|
||||
|
||||
# Shell enhancements
|
||||
echo -e "${YELLOW}Setting up shell enhancements...${NC}"
|
||||
if [ -f "$DOTFILES_DIR/shell/history-sync.zsh" ]; then
|
||||
# Add source line to .zshrc if not already present
|
||||
if ! grep -q "history-sync.zsh" "$HOME/.zshrc" 2>/dev/null; then
|
||||
echo "" >> "$HOME/.zshrc"
|
||||
echo "# History sync and enhancements" >> "$HOME/.zshrc"
|
||||
echo "source $DOTFILES_DIR/shell/history-sync.zsh" >> "$HOME/.zshrc"
|
||||
echo -e "${GREEN}✓ Added history sync to .zshrc${NC}"
|
||||
fi
|
||||
fi
|
||||
# Shell enhancements are now integrated into the main .zshrc
|
||||
echo -e "${GREEN}✓ Shell enhancements integrated into main configuration${NC}"
|
||||
|
||||
echo ""
|
||||
echo -e "${GREEN}Symlinks created successfully! 🔗${NC}"
|
||||
|
||||
Reference in New Issue
Block a user