Skip to content

Conflict with NO_CLOBBER #48

Description

@telemachus

If a user sets NO_CLOBBER, git-prompt.zsh is unhappy.

Minimal reproduction: in ~/.zshenv (with no other startup files)

setopt NO_CLOBBER
PS1='%v $(gitprompt)%#'
source ~/Downloads/src/git-prompt/git-prompt.zsh

Result:

_zsh_git_prompt_async_request:26: can't clobber parameter _ZSH_GIT_PROMPT_ASYNC_FD containing file descriptor 0
_zsh_git_prompt_async_request:41: file number expected

For the moment, I've fixed my problem by adding unsetopt NO_CLOBBER at the top of _zsh_git_prompt_async_request locally, but I wanted to let you know. (For what it's worth, I first tried adding emulate -L zsh at the top of git-prompt.zsh, but that caused other problems. At that point, I took the path of least resistance and just unset the one option.)

I overlooked a better solution, namely to add emulate -L zsh to the function that had a problem when NO_CLOBBER was set. See #49.

Activity

  1. woefe commented on Oct 18, 2025

    @woefe
    Owner

    Fixed in bd0b1d0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions