• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

bobthecow/git-flow-completion: Bash, Zsh and fish completion support for git-flo ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

bobthecow/git-flow-completion

开源软件地址:

https://github.com/bobthecow/git-flow-completion

开源编程语言:

Shell 100.0%

开源软件介绍:

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:

  1. Install git-completion.

  2. Install git-flow-completion.bash. Either:

    1. Place it in your bash_completion.d folder, usually something like /etc/bash_completion.d, /usr/local/etc/bash_completion.d or ~/bash_completion.d.

    2. Or, copy it somewhere (e.g. ~/git-flow-completion.bash) and put the following line in the .profile or .bashrc file in your home directory:

       source ~/git-flow-completion.bash
      
  3. If you are using Git < 1.7.1, you will need to edit git completion (usually /etc/bash_completion.d/git or git-completion.sh) and add the following line to the $command case in _git:

    _git ()
    {
            [...]
            case "$command" in
               [...]
               flow)        _git_flow ;;		
               *)           COMPREPLY=() ;;
            esac
    }
    

Installation for Zsh

To achieve git-flow completion nirvana:

  1. Update your zsh's git-completion module to the newest version -- available here. Optional if you have an up-to-date version of zsh.

  2. Install git-flow-completion.zsh. Either:

    1. Place it in your .zshrc.

    2. Or, copy it somewhere (e.g. ~/.git-flow-completion.zsh) and put the following line in your .zshrc:

       source ~/.git-flow-completion.zsh
      
    3. Or, use this file as an oh-my-zsh plugin.

      1. 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-completion

      After doing that, your file tree ought to look like this:

      1. Turn the plugin on by updating your zsh configuration file, ~/.zshrc

        1. open ~/.zshrc

        2. Find 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>)
          
        3. Add git-flow-completion to the list of plugins within the parentheses.

        4. Save

      2. Reload Terminal

Installation for fish

To achieve git-flow completion nirvana:

  1. Install git.fish in your ~/.config/fish/completions folder.

The Fine Print

Copyright (c) 2010-2015 Justin Hileman

Distributed under the MIT License




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap