Skip to content

support powershell for completions #525

Description

@maxandersen

it would be awesome if aesh like its support fish,zsh,etc. could support powershell as psh works on mutliple OS and in particular windows.

Register-ArgumentCompleter -Native -CommandName mycli -ScriptBlock {
    param($wordToComplete, $commandAst, $cursorPosition)

    mycli --aesh-complete -- $commandAst.ToString() |
        ForEach-Object {
            [System.Management.Automation.CompletionResult]::new(
                $_,
                $_,
                'ParameterValue',
                $_
            )
        }
}

PowerShell supports custom dynamic argument completion through Register-ArgumentCompleter, including for native commands via the -Native option:

would be awesome if this also included geneation/setup of the completion scripts.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions