diff --git a/custom-completions/git/git-completions.nu b/custom-completions/git/git-completions.nu index 3d3850c..d5bd103 100644 --- a/custom-completions/git/git-completions.nu +++ b/custom-completions/git/git-completions.nu @@ -491,3 +491,70 @@ export extern "git bisect reset" [ export extern "git help" [ command: string@"nu-complete git subcommands" # subcommand to show help for ] + +# git worktree +export extern "git worktree" [ + --help(-h) # display the help message for this command + ...args +] + +# create a new working tree +export extern "git worktree add" [ + --help(-h) # display the help message for this command + --force(-f) # checkout even if already checked out in other worktree + -b # create a new branch + -B # create or reset a branch + --detach(-d) # detach HEAD at named commit + --checkout # populate the new working tree + --lock # keep the new working tree locked + --reason # reason for locking + --quiet(-q) # suppress progress reporting + --track # set up tracking mode (see git-branch(1)) + --guess-remote # try to match the new branch name with a remote-tracking branch + ...args +] + +# list details of each worktree +export extern "git worktree list" [ + --help(-h) # display the help message for this command + --porcelain # machine-readable output + --verbose(-v) # show extended annotations and reasons, if available + --expire # add 'prunable' annotation to worktrees older than