Skip to content

add a note about "value / description" completion #838

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions book/custom_completions.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,26 @@ def my_commits [] {
}
```

> **Note**
>
> with the following snippet
>
> ```nu
> def my-command [commit: string@my_commits] {
> print $commit
> }
> ```
>
> be aware that, even though the completion menu will show you something like
>
> ```nu
> >_ my-command <TAB>
> 5c2464 Add .gitignore
> f3a377 Initial commit
> ```
>
> only the value, i.e. "5c2464" or "f3a377", will be used in the command arguments!

## External completions

External completers can also be integrated, instead of relying solely on Nushell ones.
Expand Down