From 7320f99f593d6792dc0c649c299fa7ed074f3d9b Mon Sep 17 00:00:00 2001 From: Darren Schroeder <343840+fdncred@users.noreply.github.com> Date: Mon, 28 Mar 2022 07:57:54 -0500 Subject: [PATCH] update completions (#193) move the rest of the completions to module syntax --- custom-completions/git/git-completions.nu | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/custom-completions/git/git-completions.nu b/custom-completions/git/git-completions.nu index bbb0503..0f0586b 100644 --- a/custom-completions/git/git-completions.nu +++ b/custom-completions/git/git-completions.nu @@ -1,5 +1,3 @@ -# Written by JT - def "nu-complete git branches" [] { ^git branch | lines | each { |line| $line | str find-replace '\* ' "" | str trim } } @@ -12,13 +10,8 @@ def "nu-complete git log" [] { ^git log --pretty=%h | lines | each { |line| $line | str trim } } -# Top leve git command -# extern "git" [ - -# ] - # Check out git branches and files -extern "git checkout" [ +export extern "git checkout" [ branch?: string@"nu-complete git branches" # name of the branch to checkout -b: string # create and checkout a new branch -B: string # create/reset and checkout a branch @@ -44,7 +37,7 @@ extern "git checkout" [ ] # Push changes -extern "git push" [ +export extern "git push" [ remote?: string@"nu-complete git remotes", # the name of the remote refspec?: string@"nu-complete git branches"# the branch / refspec --verbose(-v) # be more verbose