blob: c4ff4e0a5540cbda6a8e197864151801128cd42d [file] [log] [blame]
Justin Hilemanfd37e372010-04-26 13:30:18 -04001git-flow-completion
2===================
3
Justin Hileman80d36462012-07-24 11:56:33 -07004Bash, Zsh and fish completion support for [git-flow](http://github.com/nvie/gitflow).
Justin Hilemanfd37e372010-04-26 13:30:18 -04005
6The contained completion routines provide support for completing:
7
Justin Hilemanae24ff32010-10-23 15:53:33 -04008 * git-flow init and version
Justin Hilemanfd37e372010-04-26 13:30:18 -04009 * feature, hotfix and release branches
Justin Hilemanae24ff32010-10-23 15:53:33 -040010 * remote feature, hotfix and release branch names
Justin Hilemanfd37e372010-04-26 13:30:18 -040011
12
Justin Hilemanf7390da2010-08-23 09:44:10 -040013Installation for Bash
14---------------------
Justin Hilemanfd37e372010-04-26 13:30:18 -040015
16To achieve git-flow completion nirvana:
17
Justin Hileman5ee0c922010-10-30 14:33:09 -040018 0. [Install git-completion](http://github.com/bobthecow/git-flow-completion/wiki/Install-Bash-git-completion).
Justin Hilemanfd37e372010-04-26 13:30:18 -040019
Justin Hileman80d36462012-07-24 11:56:33 -070020 1. Install `git-flow-completion.bash`. Either:
Justin Hilemanfd37e372010-04-26 13:30:18 -040021
Justin Hileman0b534532012-07-24 08:22:32 -070022 1. Place it in your `bash_completion.d` folder, usually something like `/etc/bash_completion.d`,
23 `/usr/local/etc/bash_completion.d` or `~/bash_completion.d`.
Justin Hilemanfd37e372010-04-26 13:30:18 -040024
Alejandro Varasa8995db2013-01-16 11:30:49 -080025 2. Or, copy it somewhere (e.g. `~/git-flow-completion.bash`) and put the following line in the `.profile` or
Justin Hilemane7ce92c2012-07-24 08:18:30 -070026 `.bashrc` file in your home directory:
Justin Hilemanfd37e372010-04-26 13:30:18 -040027
Alejandro Varasa8995db2013-01-16 11:30:49 -080028 source ~/git-flow-completion.bash
Justin Hilemanfd37e372010-04-26 13:30:18 -040029
Justin Hilemanad10a292012-07-24 08:14:39 -070030 2. If you are using Git < 1.7.1, you will need to edit git completion (usually `/etc/bash_completion.d/git` or
31 `git-completion.sh`) and add the following line to the `$command` case in `_git`:
Justin Hilemanfd37e372010-04-26 13:30:18 -040032
nhuray57617b32012-07-13 17:33:04 +020033 _git ()
34 {
35 [...]
36 case "$command" in
37 [...]
38 flow) _git_flow ;;
39 *) COMPREPLY=() ;;
40 esac
41 }
Justin Hilemanfd37e372010-04-26 13:30:18 -040042
Zifei Tong5eda7412010-08-22 13:22:27 +080043
Justin Hilemanf7390da2010-08-23 09:44:10 -040044Installation for Zsh
45--------------------
46
47To achieve git-flow completion nirvana:
48
49 0. Update your zsh's git-completion module to the newest verion --
50 [available here](http://zsh.git.sourceforge.net/git/gitweb.cgi?p=zsh/zsh;a=blob_plain;f=Completion/Unix/Command/_git;hb=HEAD).
51
Justin Hileman80d36462012-07-24 11:56:33 -070052 1. Install `git-flow-completion.zsh`. Either:
Justin Hilemanf7390da2010-08-23 09:44:10 -040053
Justin Hileman80d36462012-07-24 11:56:33 -070054 1. Place it in your `.zshrc`.
Justin Hilemanf7390da2010-08-23 09:44:10 -040055
Justin Hileman0b534532012-07-24 08:22:32 -070056 2. Or, copy it somewhere (e.g. `~/.git-flow-completion.zsh`) and put the following line in
Justin Hileman80d36462012-07-24 11:56:33 -070057 your `.zshrc`:
Justin Hilemanf7390da2010-08-23 09:44:10 -040058
Justin Hileman0b534532012-07-24 08:22:32 -070059 source ~/.git-flow-completion.zsh
Justin Hilemanf7390da2010-08-23 09:44:10 -040060
Justin Hileman0b534532012-07-24 08:22:32 -070061 3. Or, use this file as an oh-my-zsh plugin.
Justin Hilemanf7390da2010-08-23 09:44:10 -040062
Justin Hilemanfd37e372010-04-26 13:30:18 -040063
Justin Hileman80d36462012-07-24 11:56:33 -070064Installation for fish
65---------------------
66
67To achieve git-flow completion nirvana:
68
69 1. Install `git.fish` in your `~/.config/fish/completions` folder.
70
71
Justin Hilemanfd37e372010-04-26 13:30:18 -040072The Fine Print
73--------------
74
Justin Hileman821fa742011-04-29 16:10:36 -040075Copyright (c) 2011 [Justin Hileman](http://justinhileman.com)
Justin Hilemanfd37e372010-04-26 13:30:18 -040076
77Distributed under the [MIT License](http://creativecommons.org/licenses/MIT/)