Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document pwsh shell completion #19419

Merged
merged 1 commit into from
Mar 4, 2025
Merged

Conversation

heaths
Copy link
Contributor

@heaths heaths commented Mar 4, 2025

Based on discussion in #19408, update the documentation to specify that :pwsh must be passed explicitly and that it will translate to a "powershell" argument, as is currently supported by Go's common github.com/spf13/cobra module and Rust's common clap (with clap_complete) crate.

Based on discussion in Homebrew#19408, update the documentation to specify that `:pwsh` must be passed explicitly and that it will translate to a "powershell" argument, as is currently supported by Go's common `github.com/spf13/cobra` module and Rust's common `clap` (with `clap_complete`) crate.
@heaths
Copy link
Contributor Author

heaths commented Mar 4, 2025

@MikeMcQuaid alternatively, what if shells accepted a T::Array[T.any(Symbol, Hash)] instead, such that devs could pass just :pwsh - matching the name of the executable but passing "powershell" as the completion arg, since that's what known completion handlers support; or, they could pass something like :pwsh => "pwsh" (or any string) to use a different name? Alternatively, we keep it simple and treat :pwsh as "pwsh" as an argument, and they could pass :pwsh => "powershell" if they want to pass a different argument. But, seems like extra work for what has so far been the only scenario. Again, though, it does keep it simple.

Maybe I'm just jumping the gun here, but figured may as well take care of the possibility now. Again, I haven't seen any completion arg that uses anything other than "powershell", but my experience is limited to a small handful of completion handlers.

That said, I still think it makes sense the completion dir uses "pwsh" since that's the name of the executable, just like "bash" is, well, "bash" instead of "bourne" or something.

@MikeMcQuaid
Copy link
Member

@heaths I think it's fine as-is for now.

Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

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

Thanks! Seems enough for now.

@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Mar 4, 2025
Merged via the queue into Homebrew:master with commit 9ad86c9 Mar 4, 2025
30 checks passed
@heaths heaths deleted the pwsh-support branch March 4, 2025 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants