提交 332357e0 编写于 作者: M Martin Kühl 提交者: Chris Wanstrath

Fix bash-completion for git 1.7.2.

The completion for git 1.7.2 parses the output of `git help --all`
to generate a list of available commands. The output from `hub help`
does not conform to the same format or respect the `--all` flag.

To fix this issue, we only display hub's extended help when the
`--all` (or `-a`) flag is not present, falling back to git.
上级 af33b54b
......@@ -478,7 +478,7 @@ module Hub
if command == 'hub'
puts hub_manpage
exit
elsif command.nil?
elsif command.nil? && args.grep(/^--?a/).empty?
ENV['GIT_PAGER'] = '' if args.grep(/^-{1,2}p/).empty? # Use `cat`.
puts improved_help_text
exit
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册