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
Currently tab completion in PowerShell just looks up the what name of the function that is providing the completion. However, if a non standard function is used the completions default to the least detailed option. For example, if one was to use the PSFzf tab completion which uses fzf to display a preview of the different options like the 'MenuComplete' function then instead of seeing the description it won't show anything. Would it be possible to add a check to see if an environment variable has been set, something like chezmoi_completion_mode, and if so use that to determine the mode? Then in the event that it is not set default back to using the name of the function.
The text was updated successfully, but these errors were encountered:
IIUC, you would like a user to be able to set a cobra-specific variable (such as chezmoi_completion_mode) which would specify one of TabCompleteNext, Complete or MenuComplete and would take precedence over the call to Get-PSReadLineKeyHandler?
That sounds reasonable. Feel free to submit a PR and thanks for the suggestion.
Which of the three completion options does PSFzf need?
I initially made this issue under chezmoi, but was told I should make it in the upstream cobra repo instead.
twpayne/chezmoi#4251
Currently tab completion in PowerShell just looks up the what name of the function that is providing the completion. However, if a non standard function is used the completions default to the least detailed option. For example, if one was to use the PSFzf tab completion which uses fzf to display a preview of the different options like the 'MenuComplete' function then instead of seeing the description it won't show anything. Would it be possible to add a check to see if an environment variable has been set, something like chezmoi_completion_mode, and if so use that to determine the mode? Then in the event that it is not set default back to using the name of the function.
The text was updated successfully, but these errors were encountered: