Skip to content

Commit

Permalink
Fix syntax errors (nushell#1081)
Browse files Browse the repository at this point in the history
* Fix syntax errors

* Fix typo

* Add example using zoxide completions
  • Loading branch information
Roger-Roger-debug authored Feb 3, 2024
1 parent 0963e0d commit bbb1456
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions cookbook/external_completers.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ This completer is not usable for almost every other command, so it's recommended

```nu
{
z: $zoxide_completer
zi: $zoxide_completer
z => $zoxide_completer
zi => $zoxide_completer
}
```

Expand All @@ -57,8 +57,8 @@ This completer is not usable for almost every other command, so it's recommended
>
> ```nu
> {
> __zoxide_z: $zoxide_completer
> __zoxide_zi: $zoxide_completer
> __zoxide_z => $zoxide_completer
> __zoxide_zi => $zoxide_completer
> }
> ```
Expand All @@ -68,8 +68,7 @@ Sometimes, a single external completer is not flexible enough. Luckily, as many

```nu
let multiple_completers = {|spans|
match $spans.0
{
match $spans.0 {
ls => $ls_completer
git => $git_completer
_ => $default_completer
Expand Down Expand Up @@ -155,6 +154,8 @@ let external_completer = {|spans|
git => $fish_completer
# carapace doesn't have completions for asdf
asdf => $fish_completer
# use zoxide completions for zoxide commands
__zoxide_z | __zoxide_zi => $zoxide_completer
_ => $carapace_completer
} | do $in $spans
}
Expand Down

0 comments on commit bbb1456

Please sign in to comment.