geometry-zsh/geometry

Plugin jobs check does not have correct functionality

Konsonanz opened this issue · 9 comments

geometry_prompt_jobs_check function uses the following code do determine if it's running or not:

[[ $(print -P '%j') == "0" ]]

But this checks the success value and not the stdout of the operation and always succeeds, with numerous jobs and zero running.
If you now load another plugin before jobs there will be a plugin spacer, empty space since jobs is not actually printing anything and another plugin spacer.

Thanks for reporting! I think this is fixed in the mnml branch, would you mind testing http://github.com/geometry-zsh/geometry/tree/mnml ?

Thanks for responding! The issue still persists:
2019-06-02 21-19-20
As you can see, there still is an unwanted space inserted, as well as incositend behaviour if just hitting enter (spacer gone).

So the space is a problem with geometry_exec_time, checking that now.

a() { echo a }
b() { echo b }
GEOMETRY_RPROMPT=(a geometry_exec_time b)

Okay I think I pushed a fix, can you try now?

I also fixed a bug where different shells could clobber the exec time :)

Appreciate the fix for exec_time.
But unfortunately, still a space from geometry_jobs with no jobs running:
2019-06-02 22-21-55

Thanks for being patient, I think I squashed it this time.

That did it :) Thank you very much!