-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
Windows support #6
Comments
We need to learn about completion system on PowerShell and CMD |
Maybe we can try to understand these kind of projects: https://github.com/dahlbyk/posh-git/blob/master/src/GitTabExpansion.ps1 |
I described how to implement this on yargs' issue tracker a couple years ago: yargs/yargs#1290 PowerShell has built-in JSON serialization & parsing, so interop is easy: PowerShell sends you JSON, you reply with a JSON array. This keeps all the logic in JS, with a very minimal JSON adapter written as a short PowerShell function. You can see in the snippet below, Register-ArgumentCompleter -Native -CommandName tabtab-test -ScriptBlock {
$argsEncoded = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes(($args | convertto-json)))
$results = yargs-command completion -- $argsEncoded | convertfrom-json
foreach($result in $results) {
[Management.Automation.CompletionResult]::new($result[0], $result[1], $result[2], $result[3])
}
} |
Does this library works with GIT bash for Windows? I tried it but facing some issue while running command. I wrote a script which is inspired from the docs -
and then I ran this script. It created a I restarted the git bash and checked if auto completion is working or not but I am getting some error - e*******@****-***** MINGW64 /c/Projects/projects/angular nws/test/angular-ivy-6qh2wm
$ hi bash: hello: command not found
bash: __ltrim_colon_completions: command not found e*******@****-***** MINGW64 /c/Projects/projects/angular nws/test/angular-ivy-6qh2wm
$ hello bash: hello: command not found
bash: __ltrim_colon_completions: command not found |
Great tool, Is this suppose to work on windows with CMD, powershell or git bash?
The text was updated successfully, but these errors were encountered: