diff --git a/custom-completions/git/git-completions.nu b/custom-completions/git/git-completions.nu index bf491f78f..c6f95913a 100644 --- a/custom-completions/git/git-completions.nu +++ b/custom-completions/git/git-completions.nu @@ -238,11 +238,11 @@ def "nu-complete git files" [path?: string] { | first 300 # limit the number of data for performance | each { |$it| if $it starts-with "1 " { - $it | parse --regex "1 (?P\\S+) (?:\\S+\\s?){6} (?P\\S+)" + $it | parse --regex "1 (?P\\S+) (?:\\S+\\s?){6} (?P.+)" } else if $it starts-with "2 " { - $it | parse --regex "2 (?P\\S+) (?:\\S+\\s?){6} (?P\\S+)" + $it | parse --regex "2 (?P\\S+) (?:\\S+\\s?){6} (?P.+)" } else if $it starts-with "u " { - $it | parse --regex "u (?P\\S+) (?:\\S+\\s?){8} (?P\\S+)" + $it | parse --regex "u (?P\\S+) (?:\\S+\\s?){8} (?P.+)" } else if $it starts-with "? " { $it | parse --regex "(?P.{1}) (?P.+)" } else { @@ -251,6 +251,7 @@ def "nu-complete git files" [path?: string] { } | flatten | where $it.short_status in $relevant_statuses + | update value { |row| if ($row.value | str contains " ") { $"`($row.value)`" } else { $row.value } } | insert "description" { |e| $short_status_descriptions | get $e.short_status} }