| title | attr complete |
|---|---|
| categories | core |
| version | 0.110.0 |
| core | Attribute for using another command as a completion source for all arguments. |
| usage | Attribute for using another command as a completion source for all arguments. |
| editLink | false |
| contributors | false |
attr complete for core
Attribute for using another command as a completion source for all arguments.
> attr complete {flags} (completer)
completer: Name of the completion command.
| input | output |
|---|---|
| nothing | string |
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 }