Ⅰ. 插件描述
Bash, Zsh and fish completion support for git-flow.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'bobthecow/git-flow-completion'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'bobthecow/git-flow-completion'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'bobthecow/git-flow-completion'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/bobthecow/git-flow-completion
Ⅳ. 文档说明
git-flow-completion
Bash, Zsh and fish completion support for git-flow.
The contained completion routines provide support for completing:
- git-flow init and version
- feature, hotfix and release branches
- remote feature, hotfix and release branch names
Installation for Bash
To achieve git-flow completion nirvana:
- Install git-completion.
Install
git-flow-completion.bash. Either:- Place it in your
bash_completion.dfolder, usually something like/etc/bash_completion.d,
/usr/local/etc/bash_completion.dor~/bash_completion.d. - Or, copy it somewhere (e.g.
~/git-flow-completion.bash) and put the following line in the.profileor
.bashrcfile in your home directory:
source ~/git-flow-completion.bash- Place it in your
If you are using Git < 1.7.1, you will need to edit git completion (usually
/etc/bash_completion.d/gitorgit-completion.sh) and add the following line to the$commandcase in_git:_git () { [...] case "$command" in [...] flow) _git_flow ;; *) COMPREPLY=() ;; esac }
Installation for Zsh
To achieve git-flow completion nirvana:
- Update your zsh's git-completion module to the newest version --
available here. Optional if you have an up-to-date version of zsh. Install
git-flow-completion.zsh. Either:- Place it in your
.zshrc. - Or, copy it somewhere (e.g.
~/.git-flow-completion.zsh) and put the following line in
your.zshrc:
source ~/.git-flow-completion.zshOr, use this file as an oh-my-zsh plugin.
- Install the plugin by cloning this repository to your directory for custom oh-my-zsh plugins:
git clone https://github.com/bobthecow/git-flow-completion ~/.oh-my-zsh/custom/plugins/git-flow-completionAfter doing that, your file tree ought to look like this:

Turn the plugin on by updating your zsh configuration file,
~/.zshrcopen ~/.zshrcFind the plugins section. It'll look like this:
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ # Example format: plugins=(rails git textmate ruby lighthouse) plugins=(<some-plugin> <another-plugin> <third-plugin>)- Add
git-flow-completionto the list of plugins within the parentheses. - Save
- Reload Terminal
- Place it in your
Installation for fish
To achieve git-flow completion nirvana:
- Install
git.fishin your~/.config/fish/completionsfolder.
The Fine Print
Copyright (c) 2010-2015 Justin Hileman
Distributed under the MIT License