You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When writing native argument completers, it is necessary to know the cursor position.
What is the kosher way of getting it? It is not passed as a parameter, but exists in the parent scope.
Would things break if we started passing this as a third parameter to the native completers?
param($wordToComplete, $commandAst, $cursorColumn)
Or is it ok to just expect it to be there in the parent scope?
The text was updated successfully, but these errors were encountered:
I think I fixed this in V5 - and pass it as the third parameter, if you try the Nov WMF preview, it should have the fix. But I'm not sure TabExpansion++ can pass it - maybe if it wrapped every native argument completer and registered the wrapped script block instead.
So the completers could we written to detect if they get a third parameter, or else fallback to legacy mode?
So it would work good on new powershell versions but not on < 4.0?
When writing native argument completers, it is necessary to know the cursor position.
What is the kosher way of getting it? It is not passed as a parameter, but exists in the parent scope.
Would things break if we started passing this as a third parameter to the native completers?
param($wordToComplete, $commandAst, $cursorColumn)
Or is it ok to just expect it to be there in the parent scope?
The text was updated successfully, but these errors were encountered: