I just thought this tutorial could genuinely be useful to some fellow ricers.

It explains not only the git status part of making a pure zsh prompt that looks like this:

Show

  • bloopernova@programming.dev
    ·
    11 months ago

    Powerlevel10k also does git status very well. And supports custom defined sections too. I use one to print out the epoch time, and another to print time left in an auth session.

    • tarneo@lemmy.ml
      hexagon
      ·
      11 months ago

      Yes. But p10k has many downsides:

      • requires using oh my ZSH, which alone is quite bad because of how much slower it makes the shell.
      • is a piece of software you'll have to either install on each new device or have the software in your dotfiles. Bad practice. I very much prefer having no additional dependencies or overhead, plus the way I do it I can do whatever I want without the limitations of a prompt made by someone else, for which I'd have to dig in a lot of documentation. Compared to this, I only spent half an hour making a prompt exactly how I like, which doesn't add overhead and doesn't require a third party piece of software which I'd have to install on every new device.
      • bloopernova@programming.dev
        ·
        11 months ago

        p10k doesn't require omz. You can install it by itself, the instructions are right there on the Github repo.

        On a new computer, I: git clone my dotfiles repo. Run the install script which symlinks all the relevant files, clones any needed repos like asdf, fzf, p10k, sources the .zshenv and .zshrc, runs asdf installs for my required tools, installs homebrew if on macOS, runs brew bundle to install everything else.

        Homebrew takes the longest. The rest is done in a few seconds.