Skip to content

Commit

Permalink
external completer: fixed cookbook example to exchange the first span…
Browse files Browse the repository at this point in the history
… entry only (#1193)

Signed-off-by: aserowy <serowy@hotmail.com>
  • Loading branch information
aserowy committed Jan 3, 2024
1 parent 72e5ea1 commit 7f70a63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cookbook/external_completers.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ let expanded_alias = (scope aliases | where name == $spans.0 | get -i 0 | get -i
# overwrite
let spans = (if $expanded_alias != null {
# put the first word of the expanded alias first in the span
$spans | skip 1 | prepend ($expanded_alias | split row " ")
$spans | skip 1 | prepend ($expanded_alias | split row " " | take 1)
} else { $spans })
```

Expand Down Expand Up @@ -143,7 +143,7 @@ let external_completer = {|spans|
let spans = if $expanded_alias != null {
$spans
| skip 1
| prepend ($expanded_alias | split row ' ')
| prepend ($expanded_alias | split row ' ' | take 1)
} else {
$spans
}
Expand Down

0 comments on commit 7f70a63

Please sign in to comment.