17 ms·
ZSH plus oh-my-zsh cd’ing into a git repo with large LFS files will hang your shell even on very fast NVME storage.
by ulzeraj 5y ago
ZSH plus oh-my-zsh cd’ing into a git repo with large LFS files will hang your shell even on very fast NVME storage.
- xondono 5y agoThat’s the git plugin doing it’s thing. You can fix it in config but I admit is an annoying default.
- adrusi 5y agoYou can get reasonable version control integration from zsh without any kind of wild oh-my-zsh config. Most distributed versions of zsh are compiled with vcs_info enabled. autoload -Uz vcs_info zstyle ':vcs_info:*' enable git hg zstyle ':vcs_info:*' check-for-changes true zstyle ':vcs_info:git*' formats "%{$fg[cyan]%}(%{$fg[green]%}%s %{$fg[blue]%}%r%{$fg[cyan]%}:%{$fg[green]%}%b%{$fg[yellow]%}%m%u%c%{$fg[cyan]%})%{$reset_color%} " setopt prompt_subst export PROMPT="%{$fg_bold[red]%}%n%{$reset_color$fg[white]%}@%{$fg_bold[green]%}%m%{$reset_color$fg[white]%}:%{$fg[cyan]%}%1~ \${vcs_info_msg_0_}%{$fg_bold[white]%}%(#.#.\$) %{$reset_color%}"
- ivank 5y agoI found that all I really wanted to show was the current branch, which I do with https://gist.github.com/ivan/79de5e87210e8cf21e305bb4c30c4360#file-zshrc-L217-L239 https://gist.github.com/ivan/79de5e87210e8cf21e305bb4c30c436...
- tekknik 5y agoYou can do this in fish with a direct call to git branch, and it’s not slow and doesn’t require catting files: set -l git_branch (git branch 2>/dev/null | sed -n '/\* /s///p') if test -n "$git_branch" echo -n -s (set_color yellow) "<$git_branch>" (set_color normal) " " end