From 07050f877f8c705b001e9ac36d30a3676875477d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20H=E1=BB=93ng=20Qu=C3=A2n?= Date: Fri, 14 Feb 2025 09:54:25 +0700 Subject: [PATCH] Provide completion for git subcommands (#1044) This is to provide completion for when user types `git [Tab]`. There is already completion for `git help [Tab]` but I don't know why author don't add it to `git` alone. Fixes #1043 --- custom-completions/git/git-completions.nu | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/custom-completions/git/git-completions.nu b/custom-completions/git/git-completions.nu index 5965b9e..6853dfe 100644 --- a/custom-completions/git/git-completions.nu +++ b/custom-completions/git/git-completions.nu @@ -798,3 +798,7 @@ export extern "git grep" [ --quiet(-q) # Do not output matched lines; instead, exit with status 0 when there is a match and with non-zero status when there isn’t. ...pathspecs: string # Target pathspecs to limit the scope of the search. ] + +export extern "git" [ + command?: string@"nu-complete git subcommands" # subcommand to show help for +]