├── AUTHORS ├── CHANGELOG.md ├── LICENSE ├── README.markdown ├── git-flow-completion.bash ├── git-flow-completion.plugin.zsh ├── git-flow-completion.zsh └── git.fish /AUTHORS: -------------------------------------------------------------------------------- 1 | git-flow completion AVH Authors 2 | 3 | This software consists of voluntary contributions made by many 4 | individuals. For exact contribution history, see the revision history 5 | (Changes.mdown) and logs, available at 6 | http://github.com/petervanderdoes/git-flow-completion 7 | 8 | 9 | Justin Hileman 10 | Peter van der Does 11 | Zifei Tong 12 | Alejandro Varas 13 | Marius Loewe 14 | Matt Cable 15 | Serhiy Oplakanets 16 | Austin Matzko 17 | Corin Langosch 18 | Dominique Lasserre 19 | Jeffrey Gipson 20 | MURAOKA Yusuke 21 | Milan Mitrović 22 | Seth Voltz 23 | Vincent Driessen 24 | nhuray 25 | 26 | 27 | Portions of the project are derived from other open source works are clearly 28 | marked. 29 | 30 | This file is auto generated, any changes will be lost. 31 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | [petervanderdoes]: https://github.com/petervanderdoes "Peter van der Does on github" 2 | [erlendk]: https://github.com/erlendk "Erlend Kristiansen on github" 3 | [remedy93]: https://github.com/remedy93 "remedy93 on githib" 4 | 5 | # Changelog 6 | 7 | #### 0.6.0-dev.3 8 | [Peter van der Does][petervanderdoes] 9 | * Add rename command 10 | 11 | [Erlend Kristiansen][erlendk] 12 | * Fix bash completion for bugfix command. 13 | 14 | [remedy93] 15 | * Fix zsh completion for bugfix command. 16 | 17 | #### 0.5.2 18 | [Peter van der Does][petervanderdoes] 19 | * Add missing commands: publish, rebase, bugfix, finish, delete 20 | * Add rebase subcommand for release, hotfix, support 21 | 22 | #### 0.5.0 23 | [Peter van der Does][petervanderdoes] 24 | * Update bash completion script. 25 | We added completion of flags and (sub)commands. 26 | 27 | #### Older versions 28 | No change history is recorded prior to 0.5.0 releases. 29 | 30 | #### Glossary 31 | * RFC: Request For Change. This indicates a new or improved function requested 32 | by one or more users. 33 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | Copyright (c) 2010 Justin Hileman 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 17 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 18 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 19 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 20 | OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.markdown: -------------------------------------------------------------------------------- 1 | # git-flow-completion 2 | 3 | 4 | Bash, Zsh and fish completion support for [git-flow (AVH Edition)](http://github.com/petervanderdoes/gitflow). 5 | 6 | The contained completion routines provide support for completing: 7 | 8 | * git-flow init and version 9 | * feature, hotfix and release branches 10 | * remote feature, hotfix and release branch names 11 | 12 | ## Changelog 13 | 14 | #### Current develop 15 | * Update bash completion script. 16 | We added completion of flags and (sub)commands. 17 | 18 | ## Installation for Bash 19 | 20 | 21 | To achieve git-flow completion nirvana: 22 | 23 | 0. [Install git-completion](http://github.com/petervanderdoes/git-flow-completion/wiki/Install-Bash-git-completion). 24 | 25 | 1. Install `git-flow-completion.bash`. Either: 26 | 27 | 1. Place it in your `bash_completion.d` folder, usually something like `/etc/bash_completion.d`, 28 | `/usr/local/etc/bash_completion.d` or `~/bash_completion.d`. 29 | 30 | 2. Or, copy it somewhere (e.g. `~/git-flow-completion.bash`) and put the following line in the `.profile` or 31 | `.bashrc` file in your home directory: 32 | 33 | source ~/git-flow-completion.bash 34 | 35 | 2. If you are using Git < 1.7.1, you will need to edit git completion (usually `/etc/bash_completion.d/git` or 36 | `git-completion.sh`) and add the following line to the `$command` case in `_git`: 37 | 38 | _git () 39 | { 40 | [...] 41 | case "$command" in 42 | [...] 43 | flow) _git_flow ;; 44 | *) COMPREPLY=() ;; 45 | esac 46 | } 47 | 48 | 49 | ## Installation for Zsh 50 | 51 | 52 | To achieve git-flow completion nirvana: 53 | 54 | 0. Update your zsh's git-completion module to the newest version -- 55 | [available here](http://sourceforge.net/p/zsh/code/ci/master/tree/Completion/Unix/Command/_git). Optional if you have an up-to-date version of zsh. 56 | 57 | 1. Install `git-flow-completion.zsh`. Either: 58 | 59 | 1. Place it in your `.zshrc`. 60 | 61 | 2. Or, copy it somewhere (e.g. `~/.git-flow-completion.zsh`) and put the following line in 62 | your `.zshrc`: 63 | 64 | source ~/.git-flow-completion.zsh 65 | 66 | 3. Or, use this file as an oh-my-zsh plugin. 67 | 68 | 69 | ## Installation for fish 70 | 71 | To achieve git-flow completion nirvana: 72 | 73 | 1. Install `git.fish` in your `~/.config/fish/completions` folder. 74 | 75 | 76 | ## The Fine Print 77 | 78 | Author: 79 | Copyright 2012-2013 Peter van der Does. 80 | 81 | Original Author: 82 | Copyright (c) 2011 [Justin Hileman](http://justinhileman.com) 83 | 84 | Distributed under the [MIT License](http://creativecommons.org/licenses/MIT/) 85 | -------------------------------------------------------------------------------- /git-flow-completion.bash: -------------------------------------------------------------------------------- 1 | #!bash 2 | # 3 | # git-flow-completion 4 | # =================== 5 | # 6 | # Bash completion support for [git-flow (AVH Edition)](http://github.com/petervanderdoes/gitflow) 7 | # 8 | # The contained completion routines provide support for completing: 9 | # 10 | # * git-flow init and version 11 | # * feature, bugfix, hotfix and release branches 12 | # * remote feature, bugfix, hotfix and release branch names 13 | # 14 | # 15 | # Installation 16 | # ------------ 17 | # 18 | # To achieve git-flow completion nirvana: 19 | # 20 | # 0. Install git-completion. 21 | # 22 | # 1. Install this file. Either: 23 | # 24 | # a. Place it in a `bash-completion.d` folder: 25 | # 26 | # * /etc/bash-completion.d 27 | # * /usr/local/etc/bash-completion.d 28 | # * ~/bash-completion.d 29 | # 30 | # b. Or, copy it somewhere (e.g. ~/.git-flow-completion.sh) and put the following line in 31 | # your .bashrc: 32 | # 33 | # source ~/.git-flow-completion.sh 34 | # 35 | # 2. If you are using Git < 1.7.1: Edit git-completion.sh and add the following line to the giant 36 | # $command case in _git: 37 | # 38 | # flow) _git_flow ;; 39 | # 40 | # 41 | # The Fine Print 42 | # -------------- 43 | # 44 | # Author: 45 | # Copyright 2012-2013 Peter van der Does. 46 | # 47 | # Original Author: 48 | # Copyright (c) 2011 [Justin Hileman](http://justinhileman.com) 49 | # 50 | # Distributed under the [MIT License](http://creativecommons.org/licenses/MIT/) 51 | 52 | __git_flow_config_file_options=" 53 | --local --global --system --file= 54 | " 55 | 56 | _git_flow () 57 | { 58 | local subcommands="init feature bugfix release hotfix support help version config finish delete publish rebase" 59 | local subcommand="$(__git_find_on_cmdline "$subcommands")" 60 | if [ -z "$subcommand" ]; then 61 | __gitcomp "$subcommands" 62 | return 63 | fi 64 | 65 | case "$subcommand" in 66 | init) 67 | __git_flow_init 68 | return 69 | ;; 70 | feature) 71 | __git_flow_feature 72 | return 73 | ;; 74 | bugfix) 75 | __git_flow_bugfix 76 | return 77 | ;; 78 | release) 79 | __git_flow_release 80 | return 81 | ;; 82 | hotfix) 83 | __git_flow_hotfix 84 | return 85 | ;; 86 | support) 87 | __git_flow_support 88 | return 89 | ;; 90 | config) 91 | __git_flow_config 92 | return 93 | ;; 94 | *) 95 | COMPREPLY=() 96 | ;; 97 | esac 98 | } 99 | 100 | __git_flow_init () 101 | { 102 | local subcommands="help" 103 | local subcommand="$(__git_find_on_cmdline "$subcommands")" 104 | if [ -z "$subcommand" ]; then 105 | __gitcomp "$subcommands" 106 | fi 107 | 108 | case "$cur" in 109 | --*) 110 | __gitcomp " 111 | --nodefaults --defaults 112 | --noforce --force 113 | $__git_flow_config_file_options 114 | " 115 | return 116 | ;; 117 | esac 118 | } 119 | 120 | __git_flow_feature () 121 | { 122 | local subcommands="list start finish publish track diff rebase checkout pull help delete rename" 123 | local subcommand="$(__git_find_on_cmdline "$subcommands")" 124 | 125 | if [ -z "$subcommand" ]; then 126 | __gitcomp "$subcommands" 127 | return 128 | fi 129 | 130 | case "$subcommand" in 131 | pull) 132 | __gitcomp_nl "$(__git_remotes)" 133 | return 134 | ;; 135 | checkout) 136 | __gitcomp_nl "$(__git_flow_list_local_branches 'feature')" 137 | return 138 | ;; 139 | delete) 140 | case "$cur" in 141 | --*) 142 | __gitcomp " 143 | --noforce --force 144 | --noremote --remote 145 | " 146 | return 147 | ;; 148 | esac 149 | __gitcomp_nl "$(__git_flow_list_local_branches 'feature')" 150 | return 151 | ;; 152 | finish) 153 | case "$cur" in 154 | --*) 155 | __gitcomp " 156 | --nofetch --fetch 157 | --norebase --rebase 158 | --nopreserve-merges --preserve-merges 159 | --nokeep --keep 160 | --keepremote 161 | --keeplocal 162 | --noforce_delete --force_delete 163 | --nosquash --squash 164 | --no-ff 165 | " 166 | return 167 | ;; 168 | esac 169 | __gitcomp_nl "$(__git_flow_list_local_branches 'feature')" 170 | return 171 | ;; 172 | diff) 173 | __gitcomp_nl "$(__git_flow_list_local_branches 'feature')" 174 | return 175 | ;; 176 | rebase) 177 | case "$cur" in 178 | --*) 179 | __gitcomp " 180 | --nointeractive --interactive 181 | --nopreserve-merges --preserve-merges 182 | " 183 | return 184 | ;; 185 | esac 186 | __gitcomp_nl "$(__git_flow_list_local_branches 'feature')" 187 | return 188 | ;; 189 | publish) 190 | __gitcomp_nl "$(__git_flow_list_branches 'feature')" 191 | return 192 | ;; 193 | track) 194 | __gitcomp_nl "$(__git_flow_list_branches 'feature')" 195 | return 196 | ;; 197 | *) 198 | COMPREPLY=() 199 | ;; 200 | esac 201 | } 202 | 203 | __git_flow_bugfix () 204 | { 205 | local subcommands="list start finish publish track diff rebase checkout pull help delete rename" 206 | local subcommand="$(__git_find_on_cmdline "$subcommands")" 207 | 208 | if [ -z "$subcommand" ]; then 209 | __gitcomp "$subcommands" 210 | return 211 | fi 212 | 213 | case "$subcommand" in 214 | pull) 215 | __gitcomp_nl "$(__git_remotes)" 216 | return 217 | ;; 218 | checkout) 219 | __gitcomp_nl "$(__git_flow_list_local_branches 'bugfix')" 220 | return 221 | ;; 222 | delete) 223 | case "$cur" in 224 | --*) 225 | __gitcomp " 226 | --noforce --force 227 | --noremote --remote 228 | " 229 | return 230 | ;; 231 | esac 232 | __gitcomp_nl "$(__git_flow_list_local_branches 'bugfix')" 233 | return 234 | ;; 235 | finish) 236 | case "$cur" in 237 | --*) 238 | __gitcomp " 239 | --nofetch --fetch 240 | --norebase --rebase 241 | --nopreserve-merges --preserve-merges 242 | --nokeep --keep 243 | --keepremote 244 | --keeplocal 245 | --noforce_delete --force_delete 246 | --nosquash --squash 247 | --no-ff 248 | " 249 | return 250 | ;; 251 | esac 252 | __gitcomp_nl "$(__git_flow_list_local_branches 'bugfix')" 253 | return 254 | ;; 255 | diff) 256 | __gitcomp_nl "$(__git_flow_list_local_branches 'bugfix')" 257 | return 258 | ;; 259 | rebase) 260 | case "$cur" in 261 | --*) 262 | __gitcomp " 263 | --nointeractive --interactive 264 | --nopreserve-merges --preserve-merges 265 | " 266 | return 267 | ;; 268 | esac 269 | __gitcomp_nl "$(__git_flow_list_local_branches 'bugfix')" 270 | return 271 | ;; 272 | publish) 273 | __gitcomp_nl "$(__git_flow_list_branches 'bugfix')" 274 | return 275 | ;; 276 | track) 277 | __gitcomp_nl "$(__git_flow_list_branches 'bugfix')" 278 | return 279 | ;; 280 | *) 281 | COMPREPLY=() 282 | ;; 283 | esac 284 | } 285 | 286 | __git_flow_release () 287 | { 288 | local subcommands="list start finish track publish help delete" 289 | local subcommand="$(__git_find_on_cmdline "$subcommands")" 290 | if [ -z "$subcommand" ]; then 291 | __gitcomp "$subcommands" 292 | return 293 | fi 294 | 295 | case "$subcommand" in 296 | finish) 297 | case "$cur" in 298 | --*) 299 | __gitcomp " 300 | --nofetch --fetch 301 | --sign 302 | --signingkey 303 | --message 304 | --nomessagefile --messagefile= 305 | --nopush --push 306 | --nokeep --keep 307 | --keepremote 308 | --keeplocal 309 | --noforce_delete --force_delete 310 | --notag --tag 311 | --nonobackmerge --nobackmerge 312 | --nosquash --squash 313 | --squash-info 314 | " 315 | return 316 | ;; 317 | esac 318 | __gitcomp_nl "$(__git_flow_list_local_branches 'release')" 319 | return 320 | ;; 321 | rebase) 322 | case "$cur" in 323 | --*) 324 | __gitcomp " 325 | --nointeractive --interactive 326 | --nopreserve-merges --preserve-merges 327 | " 328 | return 329 | ;; 330 | esac 331 | __gitcomp_nl "$(__git_flow_list_local_branches 'release')" 332 | return 333 | ;; 334 | delete) 335 | case "$cur" in 336 | --*) 337 | __gitcomp " 338 | --noforce --force 339 | --noremote --remote 340 | " 341 | return 342 | ;; 343 | esac 344 | __gitcomp_nl "$(__git_flow_list_local_branches 'release')" 345 | return 346 | ;; 347 | publish) 348 | __gitcomp_nl "$(__git_flow_list_branches 'release')" 349 | return 350 | ;; 351 | track) 352 | __gitcomp_nl "$(__git_flow_list_branches 'release')" 353 | return 354 | ;; 355 | start) 356 | case "$cur" in 357 | --*) 358 | __gitcomp " 359 | --nofetch --fetch 360 | " 361 | return 362 | ;; 363 | esac 364 | return 365 | ;; 366 | *) 367 | COMPREPLY=() 368 | ;; 369 | esac 370 | 371 | } 372 | 373 | __git_flow_hotfix () 374 | { 375 | local subcommands="list start finish track publish help delete rename" 376 | local subcommand="$(__git_find_on_cmdline "$subcommands")" 377 | if [ -z "$subcommand" ]; then 378 | __gitcomp "$subcommands" 379 | return 380 | fi 381 | 382 | case "$subcommand" in 383 | finish) 384 | case "$cur" in 385 | --*) 386 | __gitcomp " 387 | --nofetch --fetch 388 | --sign 389 | --signingkey 390 | --message 391 | --nomessagefile --messagefile= 392 | --nopush --push 393 | --nokeep --keep 394 | --keepremote 395 | --keeplocal 396 | --noforce_delete --force_delete 397 | --notag --tag 398 | --nonobackmerge --nobackmerge 399 | --nosquash --squash 400 | --squash-info 401 | " 402 | return 403 | ;; 404 | esac 405 | __gitcomp_nl "$(__git_flow_list_local_branches 'hotfix')" 406 | return 407 | ;; 408 | rebase) 409 | case "$cur" in 410 | --*) 411 | __gitcomp " 412 | --nointeractive --interactive 413 | --nopreserve-merges --preserve-merges 414 | " 415 | return 416 | ;; 417 | esac 418 | __gitcomp_nl "$(__git_flow_list_local_branches 'hotfix')" 419 | return 420 | ;; 421 | delete) 422 | case "$cur" in 423 | --*) 424 | __gitcomp " 425 | --noforce --force 426 | --noremote --remote 427 | " 428 | return 429 | ;; 430 | esac 431 | __gitcomp_nl "$(__git_flow_list_local_branches 'hotfix')" 432 | return 433 | ;; 434 | publish) 435 | __gitcomp_nl "$(__git_flow_list_branches 'hotfix')" 436 | return 437 | ;; 438 | track) 439 | __gitcomp_nl "$(__git_flow_list_branches 'hotfix')" 440 | return 441 | ;; 442 | start) 443 | case "$cur" in 444 | --*) 445 | __gitcomp " 446 | --nofetch --fetch 447 | " 448 | return 449 | ;; 450 | esac 451 | return 452 | ;; 453 | *) 454 | COMPREPLY=() 455 | ;; 456 | esac 457 | } 458 | 459 | __git_flow_support () 460 | { 461 | local subcommands="list start help" 462 | local subcommand="$(__git_find_on_cmdline "$subcommands")" 463 | if [ -z "$subcommand" ]; then 464 | __gitcomp "$subcommands" 465 | return 466 | fi 467 | 468 | case "$subcommand" in 469 | start) 470 | case "$cur" in 471 | --*) 472 | __gitcomp " 473 | --nofetch --fetch 474 | " 475 | return 476 | ;; 477 | esac 478 | return 479 | ;; 480 | rebase) 481 | case "$cur" in 482 | --*) 483 | __gitcomp " 484 | --nointeractive --interactive 485 | --nopreserve-merges --preserve-merges 486 | " 487 | return 488 | ;; 489 | esac 490 | __gitcomp_nl "$(__git_flow_list_local_branches 'support')" 491 | return 492 | ;; 493 | *) 494 | COMPREPLY=() 495 | ;; 496 | esac 497 | } 498 | 499 | __git_flow_config () 500 | { 501 | local subcommands="list set base" 502 | local subcommand="$(__git_find_on_cmdline "$subcommands")" 503 | if [ -z "$subcommand" ]; then 504 | __gitcomp "$subcommands" 505 | return 506 | fi 507 | 508 | case "$subcommand" in 509 | set) 510 | case "$cur" in 511 | --*) 512 | __gitcomp " 513 | $__git_flow_config_file_options 514 | " 515 | return 516 | ;; 517 | esac 518 | __gitcomp " 519 | master develop 520 | feature bugfix hotfix release support 521 | versiontagprefix 522 | " 523 | return 524 | ;; 525 | base) 526 | case "$cur" in 527 | --*) 528 | __gitcomp " 529 | set get 530 | " 531 | return 532 | ;; 533 | esac 534 | __gitcomp_nl "$(__git_flow_list_local_branches)" 535 | return 536 | ;; 537 | *) 538 | COMPREPLY=() 539 | ;; 540 | esac 541 | } 542 | 543 | __git_flow_prefix () 544 | { 545 | case "$1" in 546 | feature|bugfix|release|hotfix|support) 547 | git config "gitflow.prefix.$1" 2> /dev/null || echo "$1/" 548 | return 549 | ;; 550 | esac 551 | } 552 | 553 | __git_flow_list_local_branches () 554 | { 555 | if [ -n "$1" ]; then 556 | local prefix="$(__git_flow_prefix $1)" 557 | git for-each-ref --shell --format="ref=%(refname:short)" refs/heads/$prefix | \ 558 | while read -r entry; do 559 | eval "$entry" 560 | ref="${ref#$prefix}" 561 | echo "$ref" 562 | done | sort 563 | else 564 | git for-each-ref --format="ref=%(refname:short)" refs/heads/ | sort 565 | 566 | fi 567 | } 568 | 569 | __git_flow_list_remote_branches () 570 | { 571 | local prefix="$(__git_flow_prefix $1)" 572 | local origin="$(git config gitflow.origin 2> /dev/null || echo "origin")" 573 | git for-each-ref --shell --format='%(refname:short)' refs/remotes/$origin/$prefix | \ 574 | while read -r entry; do 575 | eval "$entry" 576 | ref="${ref##$prefix}" 577 | echo "$ref" 578 | done | sort 579 | } 580 | 581 | __git_flow_list_branches () 582 | { 583 | local origin="$(git config gitflow.origin 2> /dev/null || echo "origin")" 584 | if [ -n "$1" ]; then 585 | local prefix="$(__git_flow_prefix $1)" 586 | git for-each-ref --shell --format="ref=%(refname:short)" refs/heads/$prefix refs/remotes/$origin/$prefix | \ 587 | while read -r entry; do 588 | eval "$entry" 589 | ref="${ref##$prefix}" 590 | echo "$ref" 591 | done | sort 592 | else 593 | git for-each-ref --format="%(refname:short)" refs/heads/ refs/remotes/$origin | sort 594 | fi 595 | } 596 | 597 | # alias __git_find_on_cmdline for backwards compatibility 598 | if [ -z "`type -t __git_find_on_cmdline`" ]; then 599 | alias __git_find_on_cmdline=__git_find_subcommand 600 | fi 601 | -------------------------------------------------------------------------------- /git-flow-completion.plugin.zsh: -------------------------------------------------------------------------------- 1 | git-flow-completion.zsh -------------------------------------------------------------------------------- /git-flow-completion.zsh: -------------------------------------------------------------------------------- 1 | #!zsh 2 | # 3 | # Installation 4 | # ------------ 5 | # 6 | # To achieve git-flow completion nirvana: 7 | # 8 | # 0. Update your zsh's git-completion module to the newest verion. 9 | # From here. http://zsh.git.sourceforge.net/git/gitweb.cgi?p=zsh/zsh;a=blob_plain;f=Completion/Unix/Command/_git;hb=HEAD 10 | # 11 | # 1. Install this file. Either: 12 | # 13 | # a. Place it in your .zshrc: 14 | # 15 | # b. Or, copy it somewhere (e.g. ~/.git-flow-completion.zsh) and put the following line in 16 | # your .zshrc: 17 | # 18 | # source ~/.git-flow-completion.zsh 19 | # 20 | # c. Or, use this file as a oh-my-zsh plugin. 21 | # 22 | 23 | _git-flow () 24 | { 25 | local curcontext="$curcontext" state line 26 | typeset -A opt_args 27 | 28 | _arguments -C \ 29 | ':command:->command' \ 30 | '*::options:->options' 31 | 32 | case $state in 33 | (command) 34 | 35 | local -a subcommands 36 | subcommands=( 37 | 'init:Initialize a new git repo with support for the branching model.' 38 | 'feature:Manage your feature branches.' 39 | 'bugfix:Manage your bugfix branches.' 40 | 'config:Manage your configuration.' 41 | 'release:Manage your release branches.' 42 | 'hotfix:Manage your hotfix branches.' 43 | 'support:Manage your support branches.' 44 | 'version:Shows version information.' 45 | 'finish:Finish the branch you are currently on.' 46 | 'delete:Delete the branch you are currently on.' 47 | 'publish:Publish the branch you are currently on.' 48 | 'rebase:Rebase the branch you are currently on.' 49 | ) 50 | _describe -t commands 'git flow' subcommands 51 | ;; 52 | 53 | (options) 54 | case $line[1] in 55 | 56 | (init) 57 | _arguments \ 58 | -f'[Force setting of gitflow branches, even if already configured]' 59 | ;; 60 | 61 | (version) 62 | ;; 63 | 64 | (hotfix) 65 | __git-flow-hotfix 66 | ;; 67 | 68 | (release) 69 | __git-flow-release 70 | ;; 71 | 72 | (feature) 73 | __git-flow-feature 74 | ;; 75 | (bugfix) 76 | __git-flow-bugfix 77 | ;; 78 | 79 | (config) 80 | __git-flow-config 81 | ;; 82 | 83 | esac 84 | ;; 85 | esac 86 | } 87 | 88 | __git-flow-release () 89 | { 90 | local curcontext="$curcontext" state line 91 | typeset -A opt_args 92 | 93 | _arguments -C \ 94 | ':command:->command' \ 95 | '*::options:->options' 96 | 97 | case $state in 98 | (command) 99 | 100 | local -a subcommands 101 | subcommands=( 102 | 'start:Start a new release branch.' 103 | 'finish:Finish a release branch.' 104 | 'list:List all your release branches. (Alias to `git flow release`)' 105 | 'publish:Publish release branch to remote.' 106 | 'track:Checkout remote release branch.' 107 | 'rebase:Rebase from integration branch.' 108 | 'delete:Delete a release branch.' 109 | ) 110 | _describe -t commands 'git flow release' subcommands 111 | _arguments \ 112 | -v'[Verbose (more) output]' 113 | ;; 114 | 115 | (options) 116 | case $line[1] in 117 | 118 | (start) 119 | _arguments \ 120 | -F'[Fetch from origin before performing finish]'\ 121 | ':version:__git_flow_version_list' 122 | ;; 123 | 124 | (finish) 125 | _arguments \ 126 | -F'[Fetch from origin before performing finish]' \ 127 | -s'[Sign the release tag cryptographically]'\ 128 | -u'[Use the given GPG-key for the digital signature (implies -s)]'\ 129 | -m'[Use the given tag message]'\ 130 | -p'[Push to $ORIGIN after performing finish]'\ 131 | ':version:__git_flow_version_list' 132 | ;; 133 | 134 | (delete) 135 | _arguments \ 136 | -f'[Force deletion]' \ 137 | -r'[Delete remote branch]' \ 138 | ':version:__git_flow_version_list' 139 | ;; 140 | 141 | (publish) 142 | _arguments \ 143 | ':version:__git_flow_version_list' 144 | ;; 145 | 146 | (track) 147 | _arguments \ 148 | ':version:__git_flow_version_list' 149 | ;; 150 | 151 | (rebase) 152 | _arguments \ 153 | -i'[Do an interactive rebase]' \ 154 | ':branch:__git_branch_names' 155 | ;; 156 | 157 | *) 158 | _arguments \ 159 | -v'[Verbose (more) output]' 160 | ;; 161 | esac 162 | ;; 163 | esac 164 | } 165 | 166 | __git-flow-hotfix () 167 | { 168 | local curcontext="$curcontext" state line 169 | typeset -A opt_args 170 | 171 | _arguments -C \ 172 | ':command:->command' \ 173 | '*::options:->options' 174 | 175 | case $state in 176 | (command) 177 | 178 | local -a subcommands 179 | subcommands=( 180 | 'start:Start a new hotfix branch.' 181 | 'finish:Finish a hotfix branch.' 182 | 'delete:Delete a hotfix branch.' 183 | 'rebase:Rebase from integration branch.' 184 | 'list:List all your hotfix branches. (Alias to `git flow hotfix`)' 185 | 'rename:Rename a hotfix branch.' 186 | ) 187 | _describe -t commands 'git flow hotfix' subcommands 188 | _arguments \ 189 | -v'[Verbose (more) output]' 190 | ;; 191 | 192 | (options) 193 | case $line[1] in 194 | 195 | (start) 196 | _arguments \ 197 | -F'[Fetch from origin before performing finish]'\ 198 | ':hotfix:__git_flow_version_list'\ 199 | ':branch-name:__git_branch_names' 200 | ;; 201 | 202 | (finish) 203 | _arguments \ 204 | -F'[Fetch from origin before performing finish]' \ 205 | -s'[Sign the release tag cryptographically]'\ 206 | -u'[Use the given GPG-key for the digital signature (implies -s)]'\ 207 | -m'[Use the given tag message]'\ 208 | -p'[Push to $ORIGIN after performing finish]'\ 209 | ':hotfix:__git_flow_hotfix_list' 210 | ;; 211 | 212 | (delete) 213 | _arguments \ 214 | -f'[Force deletion]' \ 215 | -r'[Delete remote branch]' \ 216 | ':hotfix:__git_flow_hotfix_list' 217 | ;; 218 | 219 | (rebase) 220 | _arguments \ 221 | -i'[Do an interactive rebase]' \ 222 | ':branch:__git_branch_names' 223 | ;; 224 | 225 | *) 226 | _arguments \ 227 | -v'[Verbose (more) output]' 228 | ;; 229 | esac 230 | ;; 231 | esac 232 | } 233 | 234 | __git-flow-feature () 235 | { 236 | local curcontext="$curcontext" state line 237 | typeset -A opt_args 238 | 239 | _arguments -C \ 240 | ':command:->command' \ 241 | '*::options:->options' 242 | 243 | case $state in 244 | (command) 245 | 246 | local -a subcommands 247 | subcommands=( 248 | 'start:Start a new feature branch.' 249 | 'finish:Finish a feature branch.' 250 | 'delete:Delete a feature branch.' 251 | 'list:List all your feature branches. (Alias to `git flow feature`)' 252 | 'publish:Publish feature branch to remote.' 253 | 'track:Checkout remote feature branch.' 254 | 'diff:Show all changes.' 255 | 'rebase:Rebase from integration branch.' 256 | 'checkout:Checkout local feature branch.' 257 | 'pull:Pull changes from remote.' 258 | 'rename:Rename a feature branch.' 259 | ) 260 | _describe -t commands 'git flow feature' subcommands 261 | _arguments \ 262 | -v'[Verbose (more) output]' 263 | ;; 264 | 265 | (options) 266 | case $line[1] in 267 | 268 | (start) 269 | _arguments \ 270 | -F'[Fetch from origin before performing finish]'\ 271 | ':feature:__git_flow_feature_list'\ 272 | ':branch-name:__git_branch_names' 273 | ;; 274 | 275 | (finish) 276 | _arguments \ 277 | -F'[Fetch from origin before performing finish]' \ 278 | -r'[Rebase instead of merge]'\ 279 | ':feature:__git_flow_feature_list' 280 | ;; 281 | 282 | (delete) 283 | _arguments \ 284 | -f'[Force deletion]' \ 285 | -r'[Delete remote branch]' \ 286 | ':feature:__git_flow_feature_list' 287 | ;; 288 | 289 | (publish) 290 | _arguments \ 291 | ':feature:__git_flow_feature_list'\ 292 | ;; 293 | 294 | (track) 295 | _arguments \ 296 | ':feature:__git_flow_feature_list'\ 297 | ;; 298 | 299 | (diff) 300 | _arguments \ 301 | ':branch:__git_branch_names'\ 302 | ;; 303 | 304 | (rebase) 305 | _arguments \ 306 | -i'[Do an interactive rebase]' \ 307 | ':branch:__git_branch_names' 308 | ;; 309 | 310 | (checkout) 311 | _arguments \ 312 | ':branch:__git_flow_feature_list'\ 313 | ;; 314 | 315 | (pull) 316 | _arguments \ 317 | ':remote:__git_remotes'\ 318 | ':branch:__git_branch_names' 319 | ;; 320 | 321 | *) 322 | _arguments \ 323 | -v'[Verbose (more) output]' 324 | ;; 325 | esac 326 | ;; 327 | esac 328 | } 329 | 330 | __git-flow-bugfix () 331 | { 332 | local curcontext="$curcontext" state line 333 | typeset -A opt_args 334 | 335 | _arguments -C \ 336 | ':command:->command' \ 337 | '*::options:->options' 338 | 339 | case $state in 340 | (command) 341 | 342 | local -a subcommands 343 | subcommands=( 344 | 'start:Start a new bugfix branch.' 345 | 'finish:Finish a bugfix branch.' 346 | 'delete:Delete a bugfix branch.' 347 | 'list:List all your bugfix branches. (Alias to `git flow bugfix`)' 348 | 'publish:Publish bugfix branch to remote.' 349 | 'track:Checkout remote bugfix branch.' 350 | 'diff:Show all changes.' 351 | 'rebase:Rebase from integration branch.' 352 | 'checkout:Checkout local bugfix branch.' 353 | 'pull:Pull changes from remote.' 354 | 'rename:Rename a bugfix branch.' 355 | ) 356 | _describe -t commands 'git flow bugfix' subcommands 357 | _arguments \ 358 | -v'[Verbose (more) output]' 359 | ;; 360 | 361 | (options) 362 | case $line[1] in 363 | 364 | (start) 365 | _arguments \ 366 | -F'[Fetch from origin before performing finish]'\ 367 | ':bugfix:__git_flow_bugfix_list'\ 368 | ':branch-name:__git_branch_names' 369 | ;; 370 | 371 | (finish) 372 | _arguments \ 373 | -F'[Fetch from origin before performing finish]' \ 374 | -r'[Rebase instead of merge]'\ 375 | ':bugfix:__git_flow_bugfix_list' 376 | ;; 377 | 378 | (delete) 379 | _arguments \ 380 | -f'[Force deletion]' \ 381 | -r'[Delete remote branch]' \ 382 | ':bugfix:__git_flow_bugfix_list' 383 | ;; 384 | 385 | (publish) 386 | _arguments \ 387 | ':bugfix:__git_flow_bugfix_list'\ 388 | ;; 389 | 390 | (track) 391 | _arguments \ 392 | ':bugfix:__git_flow_bugfix_list'\ 393 | ;; 394 | 395 | (diff) 396 | _arguments \ 397 | ':branch:__git_branch_names'\ 398 | ;; 399 | 400 | (rebase) 401 | _arguments \ 402 | -i'[Do an interactive rebase]' \ 403 | ':branch:__git_branch_names' 404 | ;; 405 | 406 | (checkout) 407 | _arguments \ 408 | ':branch:__git_flow_bugfix_list'\ 409 | ;; 410 | 411 | (pull) 412 | _arguments \ 413 | ':remote:__git_remotes'\ 414 | ':branch:__git_branch_names' 415 | ;; 416 | 417 | *) 418 | _arguments \ 419 | -v'[Verbose (more) output]' 420 | ;; 421 | esac 422 | ;; 423 | esac 424 | } 425 | 426 | __git-flow-config () 427 | { 428 | local curcontext="$curcontext" state line 429 | typeset -A opt_args 430 | 431 | _arguments -C \ 432 | ':command:->command' \ 433 | '*::options:->options' 434 | 435 | case $state in 436 | (command) 437 | 438 | local -a subcommands 439 | subcommands=( 440 | 'list:List the configuration. (Alias to `git flow config`)' 441 | 'set:Set the configuration option' 442 | ) 443 | _describe -t commands 'git flow config' subcommands 444 | ;; 445 | 446 | (options) 447 | case $line[1] in 448 | 449 | (set) 450 | _arguments \ 451 | --local'[Use repository config file]' \ 452 | --global'[Use global config file]'\ 453 | --system'[Use system config file]'\ 454 | --file'[Use given config file]'\ 455 | ':option:(master develop feature hotfix release support versiontagprefix)' 456 | ;; 457 | 458 | *) 459 | _arguments \ 460 | --local'[Use repository config file]' \ 461 | --global'[Use global config file]'\ 462 | --system'[Use system config file]'\ 463 | --file'[Use given config file]' 464 | ;; 465 | esac 466 | ;; 467 | esac 468 | } 469 | __git_flow_version_list () 470 | { 471 | local expl 472 | declare -a versions 473 | 474 | versions=(${${(f)"$(_call_program versions git flow release list 2> /dev/null | tr -d ' |*')"}}) 475 | __git_command_successful || return 476 | 477 | _wanted versions expl 'version' compadd $versions 478 | } 479 | 480 | __git_flow_feature_list () 481 | { 482 | local expl 483 | declare -a features 484 | 485 | features=(${${(f)"$(_call_program features git flow feature list 2> /dev/null | tr -d ' |*')"}}) 486 | __git_command_successful || return 487 | 488 | _wanted features expl 'feature' compadd $features 489 | } 490 | 491 | __git_flow_bugfix_list () 492 | { 493 | local expl 494 | declare -a bugfixes 495 | 496 | bugfixes=(${${(f)"$(_call_program bugfixes git flow bugfix list 2> /dev/null | tr -d ' |*')"}}) 497 | __git_command_successful || return 498 | 499 | _wanted bugfixes expl 'bugfix' compadd $bugfixes 500 | } 501 | 502 | __git_remotes () { 503 | local expl gitdir remotes 504 | 505 | gitdir=$(_call_program gitdir git rev-parse --git-dir 2>/dev/null) 506 | __git_command_successful || return 507 | 508 | remotes=(${${(f)"$(_call_program remotes git config --get-regexp '"^remote\..*\.url$"')"}//#(#b)remote.(*).url */$match[1]}) 509 | __git_command_successful || return 510 | 511 | # TODO: Should combine the two instead of either or. 512 | if (( $#remotes > 0 )); then 513 | _wanted remotes expl remote compadd $* - $remotes 514 | else 515 | _wanted remotes expl remote _files $* - -W "($gitdir/remotes)" -g "$gitdir/remotes/*" 516 | fi 517 | } 518 | 519 | __git_flow_hotfix_list () 520 | { 521 | local expl 522 | declare -a hotfixes 523 | 524 | hotfixes=(${${(f)"$(_call_program hotfixes git flow hotfix list 2> /dev/null | tr -d ' |*')"}}) 525 | __git_command_successful || return 526 | 527 | _wanted hotfixes expl 'hotfix' compadd $hotfixes 528 | } 529 | 530 | __git_branch_names () { 531 | local expl 532 | declare -a branch_names 533 | 534 | branch_names=(${${(f)"$(_call_program branchrefs git for-each-ref --format='"%(refname)"' refs/heads 2>/dev/null)"}#refs/heads/}) 535 | __git_command_successful || return 536 | 537 | _wanted branch-names expl branch-name compadd $* - $branch_names 538 | } 539 | 540 | __git_command_successful () { 541 | if (( ${#pipestatus:#0} > 0 )); then 542 | _message 'not a git repository' 543 | return 1 544 | fi 545 | return 0 546 | } 547 | 548 | zstyle ':completion:*:*:git:*' user-commands flow:'provide high-level repository operations' 549 | -------------------------------------------------------------------------------- /git.fish: -------------------------------------------------------------------------------- 1 | #!fish 2 | # 3 | # git-flow-completion 4 | # =================== 5 | # 6 | # Fish completion support for [git-flow (AVH Edition)](http://github.com/petervanderdoes/gitflow) 7 | # 8 | # The contained completion routines provide support for completing: 9 | # 10 | # * git-flow init and version 11 | # * feature, hotfix and release branches 12 | # * remote feature, hotfix and release branch names 13 | # 14 | # 15 | # Installation 16 | # ------------ 17 | # 18 | # To achieve git-flow completion nirvana: 19 | # 20 | # 1. Install this file in your `~/.config/fish/completions` folder. 21 | # 22 | # 23 | # The Fine Print 24 | # -------------- 25 | # Author: 26 | # Copyright 2012 Peter van der Does. 27 | # 28 | # Original Author: 29 | # Copyright (c) 2012 [Justin Hileman](http://justinhileman.com) 30 | # 31 | # Distributed under the [MIT License](http://creativecommons.org/licenses/MIT/) 32 | 33 | for prefix in /usr /usr/local 34 | if test -f $prefix/share/fish/completions/git.fish 35 | . $prefix/share/fish/completions/git.fish 36 | break 37 | end 38 | end 39 | 40 | if not functions -q __fish_git_branches 41 | echo \nError: git completion not found >&2 42 | exit 43 | end 44 | 45 | ## Support functions 46 | 47 | function __fish_git_flow_using_command 48 | set cmd (commandline -opc) 49 | set subcommands 'flow' $argv 50 | if [ (count $cmd) = (math (count $subcommands) + 1) ] 51 | for i in (seq (count $subcommands)) 52 | if not test $subcommands[$i] = $cmd[(math $i + 1)] 53 | return 1 54 | end 55 | end 56 | return 0 57 | end 58 | return 1 59 | end 60 | 61 | function __fish_git_flow_prefix 62 | git config "gitflow.prefix.$argv[1]" 2> /dev/null; or echo "$argv[1]/" 63 | end 64 | 65 | function __fish_git_flow_branches 66 | set prefix (__fish_git_flow_prefix $argv[1]) 67 | __fish_git_branches | grep "^$prefix" | sed "s,^$prefix,," | sort 68 | end 69 | 70 | function __fish_git_flow_remote_branches 71 | set prefix (__fish_git_flow_prefix $argv[1]) 72 | set origin (git config gitflow.origin 2> /dev/null; or echo "origin") 73 | git branch -r 2> /dev/null | sed "s/^ *//g" | grep "^$origin/$prefix" | sed "s,^$origin/$prefix,," | sort 74 | end 75 | 76 | function __fish_git_flow_untracked_branches 77 | set branches (__fish_git_flow_branches $argv[1]) 78 | for branch in (__fish_git_flow_remote_branches $argv[1]) 79 | if not contains $branch $branches 80 | echo $branch 81 | end 82 | end 83 | end 84 | 85 | function __fish_git_flow_unpublished_branches 86 | set branches (__fish_git_flow_remote_branches $argv[1]) 87 | for branch in (__fish_git_flow_branches $argv[1]) 88 | if not contains $branch $branches 89 | echo $branch 90 | end 91 | end 92 | end 93 | 94 | 95 | ## git-flow 96 | 97 | complete -f -c git -n '__fish_git_needs_command' -a flow -d 'Manage a git-flow enabled repository' 98 | complete -f -c git -n '__fish_git_flow_using_command' -a version -d 'Show version information' 99 | 100 | 101 | 102 | ## git-flow init 103 | 104 | complete -f -c git -n '__fish_git_flow_using_command' -a init -d 'Initialize a new git repo with support for the branching model' 105 | complete -f -c git -n '__fish_git_flow_using_command init' -s f -d 'Force reinitialization' 106 | complete -f -c git -n '__fish_git_flow_using_command init' -s d -d 'Use default branch names' 107 | 108 | 109 | 110 | ## git-flow feature 111 | 112 | complete -f -c git -n '__fish_git_flow_using_command' -a feature -d 'Manage feature branches' 113 | complete -f -c git -n '__fish_git_flow_using_command feature' -a list -d 'List feature branches' 114 | complete -f -c git -n '__fish_git_flow_using_command feature' -s v -d 'Verbose output' 115 | 116 | complete -f -c git -n '__fish_git_flow_using_command feature' -a start -d 'Start a new feature branch' 117 | complete -f -c git -n '__fish_git_flow_using_command feature start' -s F -d 'Fetch from origin first' 118 | 119 | complete -f -c git -n '__fish_git_flow_using_command feature' -a finish -d 'Finish a feature branch' 120 | complete -f -c git -n '__fish_git_flow_using_command feature finish' -s F -d 'Fetch from origin first' 121 | complete -f -c git -n '__fish_git_flow_using_command feature finish' -s r -d 'Rebase instead of merging' 122 | complete -f -c git -n '__fish_git_flow_using_command feature finish' -a '(__fish_git_flow_branches feature)' -d 'Feature branch' 123 | 124 | complete -f -c git -n '__fish_git_flow_using_command feature' -a delete -d 'Delete a feature branch' 125 | complete -f -c git -n '__fish_git_flow_using_command feature delete' -s f -d 'Force deletion' 126 | complete -f -c git -n '__fish_git_flow_using_command feature delete' -s r -d 'Delete remote branch' 127 | complete -f -c git -n '__fish_git_flow_using_command feature delete' -a '(__fish_git_flow_branches feature)' -d 'Feature branch' 128 | 129 | complete -f -c git -n '__fish_git_flow_using_command feature' -a publish -d 'Publish a feature branch to remote' 130 | complete -f -c git -n '__fish_git_flow_using_command feature publish' -a '(__fish_git_flow_unpublished_branches feature)' -d 'Feature branch' 131 | 132 | complete -f -c git -n '__fish_git_flow_using_command feature' -a track -d 'Checkout remote feature branch' 133 | complete -f -c git -n '__fish_git_flow_using_command feature track' -a '(__fish_git_flow_untracked_branches feature)' -d 'Feature branch' 134 | 135 | complete -f -c git -n '__fish_git_flow_using_command feature' -a diff -d 'Show all changes' 136 | 137 | complete -f -c git -n '__fish_git_flow_using_command feature' -a rebase -d 'Rebase against integration branch' 138 | complete -f -c git -n '__fish_git_flow_using_command feature rebase' -s i -d 'Do an interactive rebase' 139 | 140 | complete -f -c git -n '__fish_git_flow_using_command feature' -a checkout -d 'Checkout local feature branch' 141 | complete -f -c git -n '__fish_git_flow_using_command feature checkout' -a '(__fish_git_flow_branches feature)' -d 'Feature branch' 142 | 143 | complete -f -c git -n '__fish_git_flow_using_command feature' -a pull -d 'Pull changes from remote' 144 | complete -f -c git -n '__fish_git_flow_using_command feature pull' -a '(__fish_git_remotes)' -d 'Remote' 145 | 146 | 147 | 148 | ## git-flow release 149 | 150 | complete -f -c git -n '__fish_git_flow_using_command' -a release -d 'Manage release branches' 151 | complete -f -c git -n '__fish_git_flow_using_command release' -a list -d 'List release branches' 152 | complete -f -c git -n '__fish_git_flow_using_command release' -s v -d 'Verbose output' 153 | 154 | complete -f -c git -n '__fish_git_flow_using_command release' -a start -d 'Start a new release branch' 155 | complete -f -c git -n '__fish_git_flow_using_command release start' -s F -d 'Fetch from origin first' 156 | 157 | complete -f -c git -n '__fish_git_flow_using_command release' -a finish -d 'Finish a release branch' 158 | complete -f -c git -n '__fish_git_flow_using_command release finish' -s F -d 'Fetch from origin first' 159 | complete -f -c git -n '__fish_git_flow_using_command release finish' -s s -d 'Sign the release tag cryptographically' 160 | complete -f -c git -n '__fish_git_flow_using_command release finish' -s u -d 'Use the given GPG-key for the digital signature (implies -s)' 161 | complete -f -c git -n '__fish_git_flow_using_command release finish' -s m -d 'Use the given tag message' 162 | complete -f -c git -n '__fish_git_flow_using_command release finish' -s p -d 'Push to $ORIGIN after performing finish' 163 | complete -f -c git -n '__fish_git_flow_using_command release finish' -a '(__fish_git_flow_branches release)' -d 'Release branch' 164 | 165 | complete -f -c git -n '__fish_git_flow_using_command release' -a delete -d 'Delete a feature branch' 166 | complete -f -c git -n '__fish_git_flow_using_command release delete' -s f -d 'Force deletion' 167 | complete -f -c git -n '__fish_git_flow_using_command release delete' -s r -d 'Delete remote branch' 168 | complete -f -c git -n '__fish_git_flow_using_command release delete' -a '(__fish_git_flow_branches release)' -d 'Release branch' 169 | 170 | complete -f -c git -n '__fish_git_flow_using_command release' -a publish -d 'Publish a release branch to remote' 171 | complete -f -c git -n '__fish_git_flow_using_command release publish' -a '(__fish_git_flow_unpublished_branches release)' -d 'Release branch' 172 | 173 | complete -f -c git -n '__fish_git_flow_using_command release' -a track -d 'Checkout remote release branch' 174 | complete -f -c git -n '__fish_git_flow_using_command release track' -a '(__fish_git_flow_untracked_branches release)' -d 'Release branch' 175 | 176 | 177 | 178 | ## git-flow hotfix 179 | 180 | complete -f -c git -n '__fish_git_flow_using_command' -a hotfix -d 'Manage hotfix branches' 181 | complete -f -c git -n '__fish_git_flow_using_command hotfix' -a list -d 'List hotfix branches' 182 | complete -f -c git -n '__fish_git_flow_using_command hotfix' -s v -d 'Verbose output' 183 | 184 | complete -f -c git -n '__fish_git_flow_using_command hotfix' -a start -d 'Start a new hotfix branch' 185 | complete -f -c git -n '__fish_git_flow_using_command hotfix start' -s F -d 'Fetch from origin first' 186 | 187 | complete -f -c git -n '__fish_git_flow_using_command hotfix' -a finish -d 'Finish a hotfix branch' 188 | complete -f -c git -n '__fish_git_flow_using_command hotfix finish' -s F -d 'Fetch from origin first' 189 | complete -f -c git -n '__fish_git_flow_using_command hotfix finish' -s s -d 'Sign the hotfix tag cryptographically' 190 | complete -f -c git -n '__fish_git_flow_using_command hotfix finish' -s u -d 'Use the given GPG-key for the digital signature (implies -s)' 191 | complete -f -c git -n '__fish_git_flow_using_command hotfix finish' -s m -d 'Use the given tag message' 192 | complete -f -c git -n '__fish_git_flow_using_command hotfix finish' -s p -d 'Push to $ORIGIN after performing finish' 193 | complete -f -c git -n '__fish_git_flow_using_command hotfix finish' -a '(__fish_git_flow_branches hotfix)' -d 'Hotfix branch' 194 | 195 | complete -f -c git -n '__fish_git_flow_using_command hotfix' -a delete -d 'Delete a feature branch' 196 | complete -f -c git -n '__fish_git_flow_using_command hotfix delete' -s f -d 'Force deletion' 197 | complete -f -c git -n '__fish_git_flow_using_command hotfix delete' -s r -d 'Delete remote branch' 198 | complete -f -c git -n '__fish_git_flow_using_command hotfix delete' -a '(__fish_git_flow_branches hotfix)' -d 'Hotfix branch' 199 | 200 | 201 | ## git-flow support 202 | 203 | complete -f -c git -n '__fish_git_flow_using_command' -a support -d 'Manage support branches' 204 | complete -f -c git -n '__fish_git_flow_using_command support' -a list -d 'List support branches' 205 | complete -f -c git -n '__fish_git_flow_using_command support' -s v -d 'Verbose output' 206 | 207 | complete -f -c git -n '__fish_git_flow_using_command support' -a start -d 'Start a new support branch' 208 | complete -f -c git -n '__fish_git_flow_using_command support start' -s F -d 'Fetch from origin first' 209 | 210 | ## git-flow config 211 | 212 | complete -f -c git -n '__fish_git_flow_using_command' -a config -d 'Manage configuration' 213 | complete -f -c git -n '__fish_git_flow_using_command config' -a list -d 'List configuration' 214 | complete -f -c git -n '__fish_git_flow_using_command config list' -l local -d 'Use repository config file' 215 | complete -f -c git -n '__fish_git_flow_using_command config list' -l global -d 'Use global config file' 216 | complete -f -c git -n '__fish_git_flow_using_command config list' -l system -d 'Use system config file' 217 | complete -f -c git -n '__fish_git_flow_using_command config list' -l file -d 'Use given config file' 218 | 219 | complete -f -c git -n '__fish_git_flow_using_command config' -a set -d 'Set configuration option' 220 | complete -f -c git -n '__fish_git_flow_using_command config start' -l local -d 'Use repository config file' 221 | complete -f -c git -n '__fish_git_flow_using_command config start' -l global -d 'Use global config file' 222 | complete -f -c git -n '__fish_git_flow_using_command config start' -l system -d 'Use system config file' 223 | complete -f -c git -n '__fish_git_flow_using_command config start' -l file -d 'Use given config file' 224 | --------------------------------------------------------------------------------