X-Git-Url: https://src.twobees.de/?a=blobdiff_plain;f=stow%2Foh-my-zsh%2F.oh-my-zsh%2Fplugins%2Fbranch%2FREADME.md;fp=stow%2Foh-my-zsh%2F.oh-my-zsh%2Fplugins%2Fbranch%2FREADME.md;h=0000000000000000000000000000000000000000;hb=1a8e170bbe5c6641a26ab1ce2e6ce6c5c1faa4cd;hp=a15dd22df2aeb1f0f756713791003165b29c45c4;hpb=475ba35502579302593f4735c853c49ef1845dcb;p=dotfiles.git diff --git a/stow/oh-my-zsh/.oh-my-zsh/plugins/branch/README.md b/stow/oh-my-zsh/.oh-my-zsh/plugins/branch/README.md deleted file mode 100644 index a15dd22..0000000 --- a/stow/oh-my-zsh/.oh-my-zsh/plugins/branch/README.md +++ /dev/null @@ -1,49 +0,0 @@ -# Branch plugin - -This plugin displays the current Git or Mercurial branch, fast. If in a Mercurial repository, -also display the current bookmark, if present. - -To use it, add `branch` to the plugins array in your zshrc file: - -```zsh -plugins=(... branch) -``` - -## Speed test - -- `hg branch`: - - ```console - $ time hg branch - 0.11s user 0.14s system 70% cpu 0.355 total - ``` - -- branch plugin: - - ```console - $ time zsh /tmp/branch_prompt_info_test.zsh - 0.00s user 0.01s system 78% cpu 0.014 total - ``` - -## Usage - -Copy your theme to `$ZSH_CUSTOM/themes/` and modify it to add `$(branch_prompt_info)` in your prompt. -This example is for the `robbyrussell` theme: - -```diff -diff --git a/themes/robbyrussell.zsh-theme b/themes/robbyrussell.zsh-theme -index 2fd5f2cd..9d89a464 100644 ---- a/themes/robbyrussell.zsh-theme -+++ b/themes/robbyrussell.zsh-theme -@@ -1,5 +1,5 @@ - PROMPT="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )" --PROMPT+=' %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)' -+PROMPT+=' %{$fg[cyan]%}%c%{$reset_color%} $(branch_prompt_info)' - - ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}" - ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " -``` - -## Maintainer - -Victor Torres ()