mirror of
https://github.com/spf13/cobra.git
synced 2024-12-23 20:15:21 -07:00
"fixing completions that contain a /"
This commit is contained in:
parent
247e8e6b55
commit
3b016843b9
@ -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 New Issue
Block a user