Skip to content

Commit 31746b5

Browse files
committed
feat: Generate shell completions on install
Homebrew can automatically generate and install completions for bash, zsh, and fish. For now, completion is limited to bash and zsh until graphite adds fish support. This simplifies the installation steps for homebrew users.
1 parent af77592 commit 31746b5

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Formula/graphite.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ class Graphite < Formula
1313
def install
1414
system "npm", "install", *Language::Node.std_npm_install_args(libexec)
1515
bin.install_symlink Dir["#{libexec}/bin/*"]
16+
17+
generate_completions_from_executable(libexec/"bin/gt", "completion", shells: [:bash, :zsh])
1618
end
1719

1820
test do

formula-templates/graphite.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ class Graphite < Formula
1313
def install
1414
system "npm", "install", *Language::Node.std_npm_install_args(libexec)
1515
bin.install_symlink Dir["#{libexec}/bin/*"]
16+
17+
generate_completions_from_executable(libexec/"bin/gt", "completion", shells: [:bash, :zsh])
1618
end
1719

1820
test do

0 commit comments

Comments
 (0)