From f6f3ea8e9b46ff98dea183b33e5d3782ed17594c Mon Sep 17 00:00:00 2001 From: OJarrisonn Date: Sun, 21 Jul 2024 08:16:06 -0300 Subject: [PATCH] fix: nu-complete for git ref and git files-and-ref uses nu-complete git switch now --- custom-completions/git/git-completions.nu | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/custom-completions/git/git-completions.nu b/custom-completions/git/git-completions.nu index 9fff56b37..6b61562ca 100644 --- a/custom-completions/git/git-completions.nu +++ b/custom-completions/git/git-completions.nu @@ -126,20 +126,15 @@ def "nu-complete git built-in-refs" [] { } def "nu-complete git refs" [] { - nu-complete git switchable branches - | parse "{value}" - | insert description Branch - | append (nu-complete git tags | parse "{value}" | insert description Tag) - | append (nu-complete git built-in-refs) + nu-complete git switch + | update description Branch + | append (nu-complete git tags | update description Tag) + | append (nu-complete git built-in-refs | wrap value | insert description Ref) } def "nu-complete git files-or-refs" [] { - nu-complete git switchable branches - | parse "{value}" - | insert description Branch - | append (nu-complete git files | where description == "Modified" | select value) - | append (nu-complete git tags | parse "{value}" | insert description Tag) - | append (nu-complete git built-in-refs) + nu-complete git refs + | prepend (nu-complete git files | where description == "Modified") } def "nu-complete git subcommands" [] {