cross-posted from: https://lemmy.ml/post/61051

Hi. Please can someone help me with setting up my zsh? I’m having two problems:

  • When using the powerline10k theme, the shell gets stuck on fetching gitstatusd

  • The prompt shows those weird characters in the screenshot

I have already installed powerline fonts. I don’t know what to do next… I appreciate any help. Thanks.

  • DonutVeteran@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    4 years ago

    Hmm, you might have to edit the config file ~/.zshrc and add the GITSTATUS_LOG_LEVEL=DEBUG parameter for further output about the specific part of “initialization” that failed. Otherwise, it’s hard to determine what exactly happened.

    • rafael@lemmy.mlOP
      link
      fedilink
      arrow-up
      1
      ·
      4 years ago

      You’re right! I edited the post including the link to the logs. Thanks!

      • DonutVeteran@lemmy.ml
        link
        fedilink
        arrow-up
        1
        ·
        4 years ago

        Ok, sorry for the late response. Looking through the logs, it seems that the problem may be curl somehow failing to fetch gitstatusd. The script tries fetching gitstatusd-linux-x86_64.tar.gz at several mirrors, from what I can gather, and all of them fail.

        This might be because curl itself is not working. I recall that there were reports of curl not working on Cygwin which I read about somewhere, and Cygwin seems to be what you’re on. I’d check if you can run the curl commands used in the logs manually to fetch the resources at those URLs. So try running:

        curl -q -kfsSL -- https://gitee.com/romkatv/gitstatus/raw/release-v1.3.1/release/gitstatusd-linux-x86_64.tar.gz
        

        Or:

        curl -q -kfsSL -- https://github.com/romkatv/gitstatus/releases/download/v1.3.1/gitstatusd-linux-x86_64.tar.gz
        

        Or any one of those mirror links in the logs, and see what happens.

        • rafael@lemmy.mlOP
          link
          fedilink
          arrow-up
          1
          ·
          4 years ago

          Thanks for the response. You’re right: curl fails to fetch that file. However, I could manually download it. Do you know where I should extract it to? Thanks.

          • DonutVeteran@lemmy.ml
            link
            fedilink
            arrow-up
            1
            ·
            4 years ago

            This thread provides a “manual installation method” you could try before attempting to manually download (as things could go wrong):

            git -C ~/.oh-my-zsh/custom/themes/powerlevel10k pull
            ~/.oh-my-zsh/custom/themes/powerlevel10k/gitstatus/install -f

            So in your case, you could modify this to update your powerlevel10k and then run the install script:

            $ git -C zsh_dir/custom/themes/powerlevel10k pull
            $ zsh_dir/custom/themes/powerlevel10k/gitstatus/install -f
            

            The install script can be found here on Github, which also provides clues to how gitstatusd is fetched: it’s actually a binary executable that is placed in a cache directory by the install script. This cache folder is referenced as "${GITSTATUS_CACHE_DIR:-${XDG_CACHE_HOME:-$HOME/.cache}/gitstatus}". So, probably your Cygwin home folder/.cache/gitstatus should be where you should try to extract gitstatusd manually.