oh-my-fish / theme-agnoster

MIT License
94 stars 63 forks source link

Theme lags fish prompt #48

Closed Quppi closed 4 years ago

Quppi commented 4 years ago

Hi guys, I hope you can help me with a strange bug I'm experiencing. My shell suddenly started to lag when I enter a command. To be specific after a command gets executed there is a delay (~1s) before the new line appears to enter a new command. E.g. ls lists all the files instantly, but then it takes another second before I can enter a new command. This only occurs with the Agnoster Theme. With the default or any other tested theme, this bug was not reproducible. I'm using a Macbook + iTerm2 + Fish + omf + Agnoster Curiously I assume this bug also happened to me a couple of weeks ago on my old Macbook, but I didn't check it out because I was getting a new one a couple of days later. On the new machine I did a fresh install including my terminal setup and everything was working fine for a couple of weeks up until now, when it now randomly started again. So far I've tried removing / reinstalling the agnoster theme. Furthermore function fish_prompt; echo ">"; end did fix the issue, though obviously messes up the theme. Any ideas? Many thanks for the help Philipp

Quppi commented 4 years ago

So I did a little debugging in my free time and found the solution: TL;DR: Apple...why So turns out, that the problem lied in the function to check for a subversion directory and modify the shell theme accordingly. The svn version shipped by apple produces following output on svn info:

svn: error: Failed to locate 'svn'. svn: error: The subversion command line tools are no longer provided by Xcode.

And takes roughly 1s to complete. Even when silencing the error message by sending them to /dev/null. Installing a different one with Homebrew resulted in the expected behaviour and normal svn output and completion time. Solution: brew install svn or alternatively disable the svn check, if you dont need it :D