5 ms·
> It doesn't appear to have completions matching those shells What kind of completions do you mean? PowerShell has completion for commands, parameter names and
by juki 4y ago
> It doesn't appear to have completions matching those shells
What kind of completions do you mean? PowerShell has completion for commands, parameter names and arguments. You can define arbitrary script blocks to do custom completion (or for simple cases just use `ValidateSet`). They can be defined either in the script/function itself, or separately with `Register-ArgumentCompleter` (that also works for non-PowerShell programs).
- Macha 4y agoIn fish, if I type ls -<tab>, I get a history based autocomplete suggestion (ls -l), and also a summary of options with brief descriptions: ls -l -1 (List one entry per line) -A --almost-all (Show hidden except . and ..) -a --all (Show hidden) -B --ignore-backups (Ignore files ending with ~) …and 51 more rows I can use the arrow keys to cycle into the "and more rows section, or type further to narrow the list. zsh supports similar. In Powershell, if I type Get-ChildItem -<tab> It just cycles through options apparently abitrarily. The first suggestion is "-Path", and it offers no facility to provide explanatory information.
- juki 4y agoIf you use `Set-PSReadLineKeyHandler -Key Tab -Function MenuComplete` it will show the options and the types of the arguments, but yeah, I don't think there is a completion function available that orders them based on history or shows the docstrings. In principle there isn't anything that would stop one from making that. PowerShell has history info available, and help messages/docstrings can be given for parameters (`Get-Help command -full` will show them if available).