"fixing completions that contain a /"

This commit is contained in:
Jack Wright 2022-12-16 09:50:05 -08:00
parent 247e8e6b55
commit 3b016843b9

View file

@ -101,7 +101,7 @@ let cobra_completer = {|spans|
# directive and directive_str are for posterity # directive and directive_str are for posterity
let stdout_lines = ($result.stdout | lines) let stdout_lines = ($result.stdout | lines)
let directive = ($stdout_lines | last | str trim | str replace ":" "" | into int) let directive = ($stdout_lines | last | str trim | str replace ":" "" | into int)
let completions = ($stdout_lines | drop | parse -r '([\w\-\.:\+\=]*)\t?(.*)' | rename value description) let completions = ($stdout_lines | drop | parse -r '([\w\-\.:\+\=\/]*)\t?(.*)' | rename value description)
let completions = if $fuzzy { let completions = if $fuzzy {
$completions | where $it.value =~ $last_span $completions | where $it.value =~ $last_span