File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ def "nu-complete git switch" [] {
5353}
5454
5555def "nu-complete git checkout" [] {
56- (nu-complete git local branches )
56+ let table_of_checkouts = (nu-complete git local branches )
5757 | parse " {value}"
5858 | insert description " local branch"
5959 | append (nu-complete git remote branches nonlocal without prefix
@@ -64,7 +64,15 @@ def "nu-complete git checkout" [] {
6464 | insert description " remote branch" )
6565 | append (nu-complete git files | where description != " Untracked" | select value | insert description " git file" )
6666 | append (nu-complete git commits all )
67- | append (nu-complete git files | where description != " Untracked" | select value )
67+
68+ return {
69+ options : {
70+ case_sensitive : false ,
71+ completion_algorithm : prefix ,
72+ sort : false ,
73+ },
74+ completions : $table_of_checkouts
75+ }
6876}
6977
7078# Arguments to `git rebase --onto <arg1> <arg2>`
@@ -125,7 +133,7 @@ def "nu-complete git files" [] {
125133def "nu-complete git built-in-refs" [] {
126134 [HEAD FETCH_HEAD ORIG_HEAD ]
127135}
128-
136+ #
129137def "nu-complete git refs" [] {
130138 nu-complete git local branches
131139 | parse " {value}"
You can’t perform that action at this time.
0 commit comments