Bash completion installation in formula

Hello,
I am new to writing formulae for linuxbrew. I am trying to create a formula for https://github.com/nelhage/reptyr.git. The problem is reptyr is not based on ./configure. So I can’t pass --sysconfdir=#{etc}, instead it just has Makefile.

  1. I see some variables like #{etc} or #{prefix} is there one for bash_completions_dir?
    a. Can I do do #{etc}/bash_completion.d/?
  2. The makefile is using expression $(shell $(PKG_CONFIG) --variable=completionsdir bash-completion 2>/dev/null) but seems like linuxbrew is not setting it up correctly?
    Thanks in advance.

There’s a bash_completion function available for use in formulae. I hope that helps!