Skip to content

How to handle .zshrc conflict when using stow with machfiles repo and the Zap Zsh installer? #193

@wxlzcll

Description

@wxlzcll

Hello,

I'm trying to manage my dotfiles using this machfiles repository with GNU Stow, but I've run into a conflict regarding the .zshrc file when also using the zap Zsh plugin manager.

Here is my workflow and the issue I encountered:

Steps to Reproduce:

Clone the machfiles repository:

Bash

git clone https://github.com/ChristianChiarulli/machfiles.git /.machfiles
cd machfiles
Install the zap plugin manager using its official installer. This step automatically creates a new .zshrc file in my home directory (
/).

Bash

zsh <(curl -s https://github.com/zap-zsh/zap/master/install.zsh)
Attempt to create symlinks for all packages in this repository using stow.

Bash

cd machfiles
stow */
Expected Behavior:

I expected stow to successfully create a symlink for ~/.zshrc pointing to the zsh/.zshrc file within this repository.

Actual Behavior:

The stow command fails with a conflict error because a real .zshrc file (created by the zap installer) already exists in the target directory.

WARNING! stowing zsh would cause conflicts:

  • existing target is neither a link nor a directory: .zshrc
    All operations aborted.
    My Question:

What is the recommended way to resolve this conflict? Should I manually merge the contents of the zap-generated .zshrc into the .zshrc file provided by this machfiles repository before running stow? Or is there a different setup you would recommend for integrating zap with these dotfiles?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions