attr complete
for core
Attribute for using another command as a completion source for all arguments.
Signature
> attr complete {flags} (completer)
Parameters
completer
: Name of the completion command.
Input/output types:
input | output |
---|---|
nothing | string |
Examples
Use another command as completion source
> def complete-foo [spans: list<string>] {
[bar baz qux spam eggs] | where $it not-in $spans
}
@complete 'complete-foo'
def foo [...args] { $args }