Justin Hileman | fd37e37 | 2010-04-26 13:30:18 -0400 | [diff] [blame] | 1 | git-flow-completion |
| 2 | =================== |
| 3 | |
Justin Hileman | 80d3646 | 2012-07-24 11:56:33 -0700 | [diff] [blame] | 4 | Bash, Zsh and fish completion support for [git-flow](http://github.com/nvie/gitflow). |
Justin Hileman | fd37e37 | 2010-04-26 13:30:18 -0400 | [diff] [blame] | 5 | |
| 6 | The contained completion routines provide support for completing: |
| 7 | |
Justin Hileman | ae24ff3 | 2010-10-23 15:53:33 -0400 | [diff] [blame] | 8 | * git-flow init and version |
Justin Hileman | fd37e37 | 2010-04-26 13:30:18 -0400 | [diff] [blame] | 9 | * feature, hotfix and release branches |
Justin Hileman | ae24ff3 | 2010-10-23 15:53:33 -0400 | [diff] [blame] | 10 | * remote feature, hotfix and release branch names |
Justin Hileman | fd37e37 | 2010-04-26 13:30:18 -0400 | [diff] [blame] | 11 | |
| 12 | |
Justin Hileman | f7390da | 2010-08-23 09:44:10 -0400 | [diff] [blame] | 13 | Installation for Bash |
| 14 | --------------------- |
Justin Hileman | fd37e37 | 2010-04-26 13:30:18 -0400 | [diff] [blame] | 15 | |
| 16 | To achieve git-flow completion nirvana: |
| 17 | |
Justin Hileman | 5ee0c92 | 2010-10-30 14:33:09 -0400 | [diff] [blame] | 18 | 0. [Install git-completion](http://github.com/bobthecow/git-flow-completion/wiki/Install-Bash-git-completion). |
Justin Hileman | fd37e37 | 2010-04-26 13:30:18 -0400 | [diff] [blame] | 19 | |
Justin Hileman | 80d3646 | 2012-07-24 11:56:33 -0700 | [diff] [blame] | 20 | 1. Install `git-flow-completion.bash`. Either: |
Justin Hileman | fd37e37 | 2010-04-26 13:30:18 -0400 | [diff] [blame] | 21 | |
Justin Hileman | 0b53453 | 2012-07-24 08:22:32 -0700 | [diff] [blame] | 22 | 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 Hileman | fd37e37 | 2010-04-26 13:30:18 -0400 | [diff] [blame] | 24 | |
Alejandro Varas | a8995db | 2013-01-16 11:30:49 -0800 | [diff] [blame] | 25 | 2. Or, copy it somewhere (e.g. `~/git-flow-completion.bash`) and put the following line in the `.profile` or |
Justin Hileman | e7ce92c | 2012-07-24 08:18:30 -0700 | [diff] [blame] | 26 | `.bashrc` file in your home directory: |
Justin Hileman | fd37e37 | 2010-04-26 13:30:18 -0400 | [diff] [blame] | 27 | |
Alejandro Varas | a8995db | 2013-01-16 11:30:49 -0800 | [diff] [blame] | 28 | source ~/git-flow-completion.bash |
Justin Hileman | fd37e37 | 2010-04-26 13:30:18 -0400 | [diff] [blame] | 29 | |
Justin Hileman | ad10a29 | 2012-07-24 08:14:39 -0700 | [diff] [blame] | 30 | 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 Hileman | fd37e37 | 2010-04-26 13:30:18 -0400 | [diff] [blame] | 32 | |
nhuray | 57617b3 | 2012-07-13 17:33:04 +0200 | [diff] [blame] | 33 | _git () |
| 34 | { |
| 35 | [...] |
| 36 | case "$command" in |
| 37 | [...] |
| 38 | flow) _git_flow ;; |
| 39 | *) COMPREPLY=() ;; |
| 40 | esac |
| 41 | } |
Justin Hileman | fd37e37 | 2010-04-26 13:30:18 -0400 | [diff] [blame] | 42 | |
Zifei Tong | 5eda741 | 2010-08-22 13:22:27 +0800 | [diff] [blame] | 43 | |
Justin Hileman | f7390da | 2010-08-23 09:44:10 -0400 | [diff] [blame] | 44 | Installation for Zsh |
| 45 | -------------------- |
| 46 | |
| 47 | To 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 Hileman | 80d3646 | 2012-07-24 11:56:33 -0700 | [diff] [blame] | 52 | 1. Install `git-flow-completion.zsh`. Either: |
Justin Hileman | f7390da | 2010-08-23 09:44:10 -0400 | [diff] [blame] | 53 | |
Justin Hileman | 80d3646 | 2012-07-24 11:56:33 -0700 | [diff] [blame] | 54 | 1. Place it in your `.zshrc`. |
Justin Hileman | f7390da | 2010-08-23 09:44:10 -0400 | [diff] [blame] | 55 | |
Justin Hileman | 0b53453 | 2012-07-24 08:22:32 -0700 | [diff] [blame] | 56 | 2. Or, copy it somewhere (e.g. `~/.git-flow-completion.zsh`) and put the following line in |
Justin Hileman | 80d3646 | 2012-07-24 11:56:33 -0700 | [diff] [blame] | 57 | your `.zshrc`: |
Justin Hileman | f7390da | 2010-08-23 09:44:10 -0400 | [diff] [blame] | 58 | |
Justin Hileman | 0b53453 | 2012-07-24 08:22:32 -0700 | [diff] [blame] | 59 | source ~/.git-flow-completion.zsh |
Justin Hileman | f7390da | 2010-08-23 09:44:10 -0400 | [diff] [blame] | 60 | |
Justin Hileman | 0b53453 | 2012-07-24 08:22:32 -0700 | [diff] [blame] | 61 | 3. Or, use this file as an oh-my-zsh plugin. |
Justin Hileman | f7390da | 2010-08-23 09:44:10 -0400 | [diff] [blame] | 62 | |
Justin Hileman | fd37e37 | 2010-04-26 13:30:18 -0400 | [diff] [blame] | 63 | |
Justin Hileman | 80d3646 | 2012-07-24 11:56:33 -0700 | [diff] [blame] | 64 | Installation for fish |
| 65 | --------------------- |
| 66 | |
| 67 | To achieve git-flow completion nirvana: |
| 68 | |
| 69 | 1. Install `git.fish` in your `~/.config/fish/completions` folder. |
| 70 | |
| 71 | |
Justin Hileman | fd37e37 | 2010-04-26 13:30:18 -0400 | [diff] [blame] | 72 | The Fine Print |
| 73 | -------------- |
| 74 | |
Justin Hileman | 821fa74 | 2011-04-29 16:10:36 -0400 | [diff] [blame] | 75 | Copyright (c) 2011 [Justin Hileman](http://justinhileman.com) |
Justin Hileman | fd37e37 | 2010-04-26 13:30:18 -0400 | [diff] [blame] | 76 | |
| 77 | Distributed under the [MIT License](http://creativecommons.org/licenses/MIT/) |