Closed Magniquick closed 9 months ago
how much time should it take for it to finish running / output something else ?
On my machine ~/zsh-bench/zsh-bench --iters 1
takes 13s.
By the way, if your username contains sensitive information, consider changing it. Then you won't have to censor it.
By the way, if your username contains sensitive information, consider changing it. Then you won't have to censor it.
too lazy right now : ) Thanks for the advise - maybe later
seems like these lines cause the issue:
if $ZDOTDIR/plugins/iterm2/utilities/it2check; then
is_iterm=True
fi
(I use that var to enable iterm2 specific things) it's crucial to note that it is that script that causes issues - merely setting the variable causes no issues Here is the file in question: it2check.txt That comes from here - the official iterm2 integration repo. (I'd debug this myself, but I'm not good enough at shell scripting or how terminals work to do so : D )
I can see how that script can break things. It doesn't just break zsh-bench, it breaks your shell, too. If you start zsh and start typing, that script may read stuff from the TTY it wasn't supposed to. To add insult to injury, this script is very slow.
Consider removing that check and simply doing stuff unconditionally.
I can see how that script can break things. It doesn't just break zsh-bench, it breaks your shell, too. If you start zsh and start typing, that script may read stuff from the TTY it wasn't supposed to. To add insult to injury, this script is very slow.
Consider removing that check and simply doing stuff unconditionally.
ouch, thanks. Should I file a bug ? would this even be considered as one - as this 'breaking stuff' seems to be part of its function ?
(BTW, thanks for your work in the zsh field - I am currently using one of your diy configs as a base and it works extremely well for me !)
Sure, You can file a bug, but I'm not sure how useful that will be. Basically, apart from being slow, this script has these issues:
In general, reading TTY input and dropping it on the floor is a bad idea.
It is possible to implement this script correctly and make it fast, at least in zsh, but it's non-trivial.
I am currently using one of your diy configs as a base
Just to clarify: the existence of this config in my repo does not mean that I endorse it. If you like it, by all means.
Sure, You can file a bug, but I'm not sure how useful that will be. Basically, apart from being slow, this script has these issues:
It consumes pending input. If you start typing while this script is running (while for you means typing while zsh is initializing), a portion of that input may silently disappear.
It assumes that no input comes between dropping all buffered input and reading the response to the DSR. It's a race condition.
In general, reading TTY input and dropping it on the floor is a bad idea.
It is possible to implement this script correctly and make it fast, at least in zsh, but it's non-trivial.
guess I'll more back to reading the env variables.
I am currently using one of your diy configs as a base
Just to clarify: the existence of this config in my repo does not mean that I endorse it. If you like it, by all means.
ofc - but it does work well for my workflow - and I dont see any large drawbacks. Thanks again !
My .zshrc is incredibly nonstandard, so I'll try to trim it down and see what causes the issue. on that note, how much time should it take for it to finish running / output something else ?