Open leyyinad opened 5 years ago
I've also found that eval "$(thefuck --alias)"
is slow.
Slow enough I'd often end up executing udo apt install
and the like because the first letter(s) were cut off.
I tried this instead (with bash) and it works perfectly, so I'll be using it from now on. Nice work.
+1 from me!
Slightly different approach, I am caching the output of thefuck --alias
for 5 days, so the slowdown only happens once in this time.
find ~/.bash_fuck -mtime +5 -delete
[[ -f ~/.bash_fuck ]] || eval $(thefuck --alias |tee ~/.bash_fuck)
eval $(cat ~/.bash_fuck )
Good morning everyone,
while profiling and optimizing my
.zshrc
, I just found thateval "$(thefuck --alias)"
consumes quite some time (around 0.1s). I solved it by replacing it withThis saves me around 100 sec when starting my zsh. Of course this might slow down running
fuck
, but it's clearly worth the price. Might this cause problems or did anybody figure a better way? I'm really not fond of spending 100ms on each shell invocation even on sessions when not usingthefuck
at all.Any opinions on that?
Thank you! Daniel