-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Bug Description
install.sh hardcodes symlink destinations to $HOME/.zshrc but .zprofile sets ZDOTDIR=$HOME/.config/zsh (XDG Base Directory specification). This causes zsh to not find .zshrc on login, breaking starship prompt initialization.
Current Behavior
install.sh line 70:
link_file "$DOTFILES_DIR/.zshrc" "$HOME/.zshrc"But .zprofile line 18 sets:
export ZDOTDIR="${XDG_CONFIG_HOME}/zsh"Result: Zsh looks for .zshrc in ~/.config/zsh/ but install.sh creates it in ~/
Impact
- Starship prompt doesn't initialize on SSH login
- Users see plain
hostname%instead of colored starship prompt - All zsh configurations fail to load
- Aliases, functions, and plugins not available
Expected Behavior
install.sh should respect ZDOTDIR environment variable and create symlinks in the correct location:
- If
ZDOTDIRis set → symlink to$ZDOTDIR/.zshrc - If
ZDOTDIRis unset → symlink to$HOME/.zshrc(current behavior)
Proposed Fix
# Determine where zsh config should go
ZSH_CONFIG_DIR="${ZDOTDIR:-$HOME}"
# Create ZDOTDIR if it doesn't exist
if [ -n "$ZDOTDIR" ] && [ ! -d "$ZDOTDIR" ]; then
mkdir -p "$ZDOTDIR"
echo "[CREATE] Directory: $ZDOTDIR"
fi
# Link zshrc to correct location
link_file "$DOTFILES_DIR/.zshrc" "$ZSH_CONFIG_DIR/.zshrc"Reproduction
- Source
.zprofilewhich setsZDOTDIR=~/.config/zsh - Run
install.sh - SSH into system
- Observe: Plain prompt, no starship, no aliases
Environment
- OS: Ubuntu 22.04 LTS
- Shell: zsh 5.8.1
- Context: Discovered during vm-infra provisioning testing
Related
- XDG Base Directory Specification compliance
- Affects all users who set
ZDOTDIRin their environment
Workaround
Currently using workaround in vm-infra ansible playbook to create ~/.config/zsh/ and symlink .zshrc manually after dotfiles installation. Would prefer to fix root cause in dotfiles repo.
Labels
bug, xdg-compliance, zsh
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working