Comments (11)
Same problem here. Babun takes a long time to show prompt and git status takes forever
from babun.
@MatanRubin thanks - I had missed that. Indeed, with the "babun" theme, the speed is back to normal. I am still unsure what the other themes got wrong, and/or if it is possible to apply the speed fix to all of them in a transparent way.
In any case, thanks @tombujok for the fix!
from babun.
@tombujok Here is another thread about possible enhancements to speed up the git prompt on cygwin. Seems we have to avoid forks at all costs.
from babun.
Added babun zsh theme which optimizes the speed of the git prompt
from babun.
@tombujok, I still suffer from very slow git prompt (Win8.1), whenever I am inside a git repository, it takes 5 or 6 seconds to display the line (on a newly created repo, with just a few commits). Can you share which theme was the one you added to share this issue? Thanks in advance,
from babun.
Same problem here, Windows 10, just trying babun within git working directory.
from babun.
For future readers:
I had this problem as well. To use the theme @tombujok added make sure your theme is set to "babun" in your ~/.zshrc
:
ZSH_THEME="babun"
I believe this is now the default when you install babun, but if you happened to change your theme and later on not realise why things slowed down - this is probably the reason.
from babun.
I have a similar problem (my theme is set to babun).
git status
takes around 0.5 seconds when run in bash (from Git for Windows) and around 2 seconds when run in Babun. The funny thing is: if I run git status
in bash and then run the same command in babun it takes 5 seconds the first time and the subsequent runs take the same 2 seconds.
from babun.
Same here.. have babun theme as well.
from babun.
How did you optimize babun's theme for git prompt? How would I do the same for another zsh theme?
from babun.
I gained 2 seconds commenting out the vcs_info line in the prompt_git function in the agonster-theme file; now it takes only half a second to return to the prompt.
`
prompt_git() {
(( $+commands[git] )) || return
local PL_BRANCH_CHAR
() {
local LC_ALL="" LC_CTYPE="en_US.UTF-8"
PL_BRANCH_CHAR=$'\ue0a0' #
}
local ref dirty mode repo_path
repo_path=$(git rev-parse --git-dir 2>/dev/null)
if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then
dirty=$(parse_git_dirty)
ref=$(git symbolic-ref HEAD 2> /dev/null) || ref="➦ $(git rev-parse --short HEAD 2> /dev/null)"
if [[ -n $dirty ]]; then
prompt_segment yellow black
else
prompt_segment green black
fi
if [[ -e "${repo_path}/BISECT_LOG" ]]; then
mode=" <B>"
elif [[ -e "${repo_path}/MERGE_HEAD" ]]; then
mode=" >M<"
elif [[ -e "${repo_path}/rebase" || -e "${repo_path}/rebase-apply" || -e "${repo_path}/rebase-merge" || -e "${repo_path}/../.dotest" ]]; then
mode=" >R>"
fi
setopt promptsubst
autoload -Uz vcs_info
zstyle ':vcs_info:*' enable git
zstyle ':vcs_info:*' get-revision true
zstyle ':vcs_info:*' check-for-changes true
zstyle ':vcs_info:*' stagedstr '✚'
zstyle ':vcs_info:*' unstagedstr '●'
zstyle ':vcs_info:*' formats ' %u%c'
zstyle ':vcs_info:*' actionformats ' %u%c'
#vcs_info
echo -n "${ref/refs\/heads\//$PL_BRANCH_CHAR }${vcs_info_msg_0_%% }${mode}"
fi
}
`
from babun.
Related Issues (20)
- died waiting for dll loading, errno 11 HOT 1
- Can't install gcc-g++, verification hash did not match
- Support for VSCode as shell
- NFS-Client-mount works well at CMD.exe but not Cygwin Shell?
- Getting the latest version
- How to install YouCompleteMe in babun for vim HOT 2
- Still maintained? HOT 34
- Download link expired HOT 4
- run python3.6 error HOT 2
- ipython:7.4 py:3.64 %edit subproess BlockingIOError
- babun doesn't support neovim ?
- can not update or reinstall tar
- How Can I make a sshpass? HOT 1
- mintty shrunks special characters, they are not displayed correctly. HOT 1
- adb shell displays error
- Tmux and the home/end keys HOT 1
- No $ sign in Babun on my windows laptop.How to start using it? HOT 1
- Startup "Error" Babuun HOT 1
- Stuck at Heroku login
- xhere seems not work when integrate with vscode HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from babun.