Skip to content
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

external completer: fixed cookbook example to exchange the first span entry only #1193

Merged
merged 1 commit into from
Jan 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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