From: "Philippe Blain via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Steffen Prohaska <prohaska@zib.de>,
Philippe Blain <levraiphilippeblain@gmail.com>,
Philippe Blain <levraiphilippeblain@gmail.com>
Subject: [PATCH] completion: improve doc for complex aliases
Date: Sat, 09 Sep 2023 15:49:52 +0000 [thread overview]
Message-ID: <pull.1585.git.1694274592854.gitgitgadget@gmail.com> (raw)
From: Philippe Blain <levraiphilippeblain@gmail.com>
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@gmail.com>
---
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
next reply other threads:[~2023-09-09 16:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-09 15:49 Philippe Blain via GitGitGadget [this message]
2023-09-10 2:02 ` [PATCH] completion: improve doc for complex aliases Eric Sunshine
2023-09-12 1:04 ` Linus Arver
2023-09-12 12:13 ` Philippe Blain
2023-09-12 17:02 ` [PATCH v2] " Philippe Blain via GitGitGadget
2023-09-13 0:58 ` Junio C Hamano
2023-09-14 22:50 ` Linus Arver
2023-09-14 22:33 ` Linus Arver
2023-09-20 18:28 ` [PATCH] completion: loosen and document the requirement around completing alias Junio C Hamano
2023-09-20 18:46 ` Junio C Hamano
2023-09-22 18:31 ` Linus Arver
2023-09-22 19:49 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=pull.1585.git.1694274592854.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=levraiphilippeblain@gmail.com \
--cc=prohaska@zib.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.