Skip to content

Commit

Permalink
Merge pull request #42 from michaelhood/mh/completions-search
Browse files Browse the repository at this point in the history
Include dash in shell completion search pattern
  • Loading branch information
Andy Fleener authored Feb 9, 2017
2 parents d1bc200 + ce65f1e commit 676fa10
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/brew/gem/formula.rb.erb
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ class <%= klass %> < Formula
completion_for_bash = Dir[
"#{brew_gem_prefix}/completion{s,}/<%= name %>.{bash,sh}",
"#{brew_gem_prefix}/**/<%= name %>_completion{s,}.{bash,sh}"
"#{brew_gem_prefix}/**/<%= name %>{_,-}completion{s,}.{bash,sh}"
].first
bash_completion.install completion_for_bash if completion_for_bash

completion_for_zsh = Dir[
"#{brew_gem_prefix}/completions/<%= name %>.zsh",
"#{brew_gem_prefix}/**/<%= name %>_completion{s,}.zsh"
"#{brew_gem_prefix}/**/<%= name %>{_,-}completion{s,}.zsh"
].first
zsh_completion.install completion_for_zsh if completion_for_zsh

Expand Down

0 comments on commit 676fa10

Please sign in to comment.