Skip to content

chore: Add btp cli shell completion for bash, pwsh and zsh#269367

Open
paulchen5 wants to merge 1 commit into
Homebrew:mainfrom
paulchen5:add-shell-completion-btp-cli
Open

chore: Add btp cli shell completion for bash, pwsh and zsh#269367
paulchen5 wants to merge 1 commit into
Homebrew:mainfrom
paulchen5:add-shell-completion-btp-cli

Conversation

@paulchen5

@paulchen5 paulchen5 commented Jun 12, 2026

Copy link
Copy Markdown

After making any changes to a cask, existing or new, verify:

Additionally, if adding a new cask:

  • Named the cask according to the token reference.
  • Checked the cask was not already refused (add your cask's name to the end of the search field).
  • brew audit --cask --new <cask> worked successfully.
  • HOMEBREW_NO_INSTALL_FROM_API=1 brew install --cask <cask> worked successfully.
  • brew uninstall --cask <cask> worked successfully.

  • AI was used to generate or assist with generating this PR. Please specify below how you used AI to help you, and what steps you have taken to manually verify the changes, including zap stanza paths.

Explain the brew style output and let it fix it as brew style requires a brew tap to work.
Verification: CI didn't work previously; now it works; I am not familiar with ruby style code


@paulchen5

Copy link
Copy Markdown
Author

When running btp enable autocomplete <shell-name> something like this should be added to your shells rc file:

### Begin SAP BTP command line interface autocomplete
eval "$(btp --autocomplete=init:zsh)"
### End SAP BTP command line interface autocomplete

@paulchen5

Copy link
Copy Markdown
Author

Is there a way to check that it works locally?

@paulchen5

Copy link
Copy Markdown
Author

Well I think I was mixing up casks here with formulas. Is there a reason why the cli tool is being counted as a cask?

Comment thread Casks/b/btp.rb Outdated
Comment on lines +28 to +30
def install
generate_completions_from_executable(bin/"btp", "--autocomplete=init:", shells: [:bash, :zsh, :pwsh])
end

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def install
generate_completions_from_executable(bin/"btp", "--autocomplete=init:", shells: [:bash, :zsh, :pwsh])
end
generate_completions_from_executable "btp", "--autocomplete=init:"

This is the required format for a Cask.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait do I also have to omit the shells here?

@bevanjkay

Copy link
Copy Markdown
Member

Well I think I was mixing up casks here with formulas. Is there a reason why the cli tool is being counted as a cask?

Closed-source tools are always Casks, as they cannot be built from source as a Formula.

@paulchen5 paulchen5 force-pushed the add-shell-completion-btp-cli branch from abb906e to a0dcaa7 Compare June 13, 2026 10:55
@paulchen5 paulchen5 force-pushed the add-shell-completion-btp-cli branch from 7b89194 to 01eecc7 Compare June 13, 2026 11:22
@paulchen5 paulchen5 force-pushed the add-shell-completion-btp-cli branch 2 times, most recently from 8caeb93 to f24ad96 Compare June 13, 2026 11:47
@paulchen5 paulchen5 force-pushed the add-shell-completion-btp-cli branch from f24ad96 to 9d66d2f Compare June 13, 2026 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants