mirror of
https://github.com/spf13/cobra
synced 2024-12-29 15:57:10 +00:00
"fixing completions that contain a /"
This commit is contained in:
parent
247e8e6b55
commit
3b016843b9
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue