From: Philippe Blain <levraiphilippeblain@xxxxxxxxx> The completion code can be told to use a particular completion for aliases that shell out by using ': git <cmd> ;' as the first command of the alias. This only works if <cmd> and the semicolon are separated by a space. The examples have that space but it's not clear if it's just for style or if it's mandatory. Explicitely mention it. Signed-off-by: Philippe Blain <levraiphilippeblain@xxxxxxxxx> --- completion: improve doc for complex aliases The completion code can be told to use a particular completion for aliases that shell out by using ': git ;' as the first command of the alias. This only works if and the semicolon are separated by a space. The examples have that space but it's not clear if it's just for style or if it's mandatory. Explicitely mention it. Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1585%2Fphil-blain%2Fcompletion-shell-aliases-doc-v1 Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1585/phil-blain/completion-shell-aliases-doc-v1 Pull-Request: https://github.com/gitgitgadget/git/pull/1585 contrib/completion/git-completion.bash | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index dc95c34cc85..659df570496 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -28,6 +28,7 @@ # completion style. For example '!f() { : git commit ; ... }; f' will # tell the completion to use commit completion. This also works with aliases # of form "!sh -c '...'". For example, "!sh -c ': git commit ; ... '". +# Be sure to add a space between the command name and the ';'. # # If you have a command that is not part of git, but you would still # like completion, you can use __git_complete: base-commit: 23c56f7bd5f1667f8b793d796bf30e39545920f6 -- gitgitgadget