sindresorhus / pure

Pretty, minimal and fast ZSH prompt
MIT License
13.12k stars 971 forks source link

Pure runs a useless zsh subprocess with each command #628

Closed Arrow-x closed 2 years ago

Arrow-x commented 2 years ago

General information

System report (output of prompt_pure_system_report):

Other information

I have:

Problem description

for every application that runs under zsh has another zsh porcess as a sibling that can be killed just fine

Reproduction steps

  1. run a command
  2. check htop or btop in tree mode

My .zshrc:

fpath+=$HOME/.zsh/pure autoload -U promptinit; promptinit prompt pure

ivan-volnov commented 2 years ago

A duplicate of #612

@mafredri is there any option to completely disable async workers along with a complex git functional?

mafredri commented 2 years ago

@Arrow-x the reason it works even if you kill it is that a new one is started up. It's part of what allows Pure to do background processing (like git fetch and status).

@ivan-volnov No, there is no way to disable it. It's the main feature of Pure so it doesn't really make sense to make it an option.

Just look at how simple pure.zsh was before all the async functionality: https://github.com/sindresorhus/pure/blob/b76a0efe742775b7efeb4f262ca86d6d05163797/pure.zsh

ivan-volnov commented 2 years ago

Thanks for the hint!)

Forked it to remove async functionality.