git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ping Yin <pkufranky@gmail.com>
To: git mailing list <git@vger.kernel.org>
Subject: How to setup bash completion for alias of git command
Date: Sat, 12 Jan 2013 22:30:45 +0800	[thread overview]
Message-ID: <CACSwcnQu8Rx83mcGYR6NGzEhoreNR6DfiK876LF7pa9PGm30JA@mail.gmail.com> (raw)

Following setup works for me  in ubuntu (10.04,11.04) for a long time

alias gtlg='git log'
complete -o default -o nospace -F _git_log gtlg

However, in debian (testing, wheezy), it doesn't work

$ gtlg or<TAB>
gtlg or-bash: [: 1: unary operator expected
-bash: [: 1: unary operator expected

$ git --version
git version 1.7.10

Can anybody help?

             reply	other threads:[~2013-01-12 14:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-12 14:30 Ping Yin [this message]
2013-01-13  3:13 ` How to setup bash completion for alias of git command Ping Yin
2013-01-20 11:14 ` Jonathan Nieder
2013-01-21  3:55   ` Ping Yin

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=CACSwcnQu8Rx83mcGYR6NGzEhoreNR6DfiK876LF7pa9PGm30JA@mail.gmail.com \
    --to=pkufranky@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.
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 NNTP newsgroup(s).