git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Philippe Blain <levraiphilippeblain@gmail.com>
To: Git mailing list <git@vger.kernel.org>
Subject: Completion for aliases that wrap aliases that wrap Git commands
Date: Fri, 6 Nov 2020 17:42:43 -0500	[thread overview]
Message-ID: <9717A684-9304-4A65-8566-19F946098455@gmail.com> (raw)

Hello all,

I've noticed the following: I have a Git alias that is simply a Git command 
with some options, like

$ git config --get alias.logo
log --abbrev-commit --decorate --format=format:'%C(yellow bold)%h%C(reset) %C(normal)%s%C(reset) %C(dim white)%an%C(reset) %C(dim blue)(%ad)%C(reset) %C(auto)%d%C(reset)'

And another alias that is this previous alias with more options:

$ git config --get alias.lg
logo --first-parent

When typing 'git logo up[TAB][TAB]', the Bash completion script
suggests 'upstream' (like if I type 'git log up[TAB][TAB]'),
but typing 'git lg up[TAB][TAB]' does not suggest anything.

So I'm thinking there is some special logic in the completion script that makes it 
work for simple aliases but not for recursive aliases.

I know nothing about Bash completions, but I'm wondering if that feature would
be possible at all ?

This is on Bash 4.4.19(1) (not that I think it matters very much...)

Cheers,

Philippe.

             reply	other threads:[~2020-11-06 22:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-06 22:42 Philippe Blain [this message]
2020-11-09 21:56 ` Completion for aliases that wrap aliases that wrap Git commands Felipe Contreras
2020-11-10  3:01   ` Philippe Blain

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9717A684-9304-4A65-8566-19F946098455@gmail.com \
    --to=levraiphilippeblain@gmail.com \
    --cc=git@vger.kernel.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).