-
Notifications
You must be signed in to change notification settings - Fork 116
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
Powershell autompletion script #315
Comments
I'm glad to hear that you're enjoying the bash and zsh ones. I don't have a Windows installation right now, so can't really look into it for you at the moment. I'll revisit if that changes, but I'm also open to PRs. |
Still don't have a windows machine. If you want to put up a PR though I can have a look. I think the biggest challenge is that we support bash functions for completions out of the box, and these will fail if bash isn't installed. User miles may vary in other words... |
Hi! To be honest, I am not really familiar with inner workings of powershell scripts, I guess I'll manage something partially working soon, but I do not promise anything definitive. |
A bit of necroposting: in fact, one does not need a windows machine to use powershell (per https://github.com/PowerShell/PowerShell, it's been cross-platform for quite some time). A more useful remark for a user who has more time and desire to further this subject: it seems that Again, I promise nothing, maybe in a year ( I know, right =)) I'll have a working solution. |
And a quick addendum: $scriptblock = {
param($commandName, $parameterName, $stringMatch)
$result = & invoke-Expression "myExecutable.exe --bash-completion-index 0 --bash-completion-word $commandName"
$result
}
Register-ArgumentCompleter -Native -CommandName myExecutable.exe -ScriptBlock $scriptBlock This script already gives a rudimentary tab-completion for names of |
I use autocompletion scripts provided by
optparse-applicative
quite a lot in bash and zsh. Are there any plans to provide such scripts for powershell? Is is possible at all?The text was updated successfully, but these errors were encountered: