[FEATURE] Restructure Zsh config to follow XDG Base Directory

Abierto
#1,825 0 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@mylinuxforwork ya está trabajando en esto.

Desde el 6/9/2026.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

enhancement
Is your feature request related to a problem? Please describe.

The current Zsh setup places .zshrc directly in home directory and links configs from ~/.config/zshrc/ or .zshrc_custom file that may be created in home directory. Moreover, runtime files like .zsh_history and zcompdump files end up directly in the home directory, polluting the root of home directory.

Potential conflict with existing ZDOTDIR in ~/.zshenv:
If a user already has a ~/.zshenv setting ZDOTDIR (e.g., pointing to ~/.config/zsh), Zsh will search for .zshrc inside $ZDOTDIR and completely ignore the ~/.zshrc file generated/placed by the ML4W installer in home directory. Moving to a native ZDOTDIR architecture prevents this conflict and ensures ML4W configs are loaded predictably.

Describe the solution you'd like
  • Instead of putting .zshrc in home directory, create a minimalist ~/.zshenv file that sets export ZDOTDIR="$HOME/.config/zsh".
  • Move all Zsh configuration files (.zshrc, aliases, plugins and etc) inside $ZDOTDIR/ (~/.config/zsh/).
  • Explicitly set paths inside Zsh config for history and completion dump files to keep home dir clean:
# History
HISTFILE="$ZDOTDIR/.zsh_history"

# Cache
## check if cache folder env exists and set if not
: "${XDG_CACHE_HOME:=$HOME/.cache}"

## check if ZSH folder exists in .cache folder and create if not
[[ -d "$XDG_CACHE_HOME/zsh" ]] || mkdir -p "$XDG_CACHE_HOME/zsh"

## set folder for ZSH cache
autoload -Uz compinit
compinit -d "$XDG_CACHE_HOME/zsh/zcompdump-$ZSH_VERSION"
Describe alternatives you've considered

No response

Additional context

Following the XDG Base Directory Specification makes dotfiles much cleaner, modular, and easier to backup/manage.

Support or Contribution
Lenguaje dominante
QML
Estrellas
5.1k
Forks
386
Merge medio
16 h 45 min
PR fusionados (30 d)
14

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de mylinuxforwork/dotfiles

Todos los issues de mylinuxforwork/dotfiles

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.