attr complete

For core.

Attribute for using another command as a completion source for all arguments.

Command Type

built-in

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 }

Ported from nushell/nushell.github.io. Copyright (c) 2021 Nushell Project. MIT License.