From: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
To: Nazri Ramliy <ayiehere@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Announce: git-number
Date: Thu, 24 Mar 2011 12:46:35 +0700 [thread overview]
Message-ID: <AANLkTi==8_hssWSHkR0DTynibtT83iUEq-M_nPO5gN1m@mail.gmail.com> (raw)
In-Reply-To: <AANLkTinJTy5OkcU+L=nFVwGMNBepuYgAr-+Jk=OVmG6P@mail.gmail.com>
On Thu, Mar 24, 2011 at 11:51 AM, Nazri Ramliy <ayiehere@gmail.com> wrote:
> Hi,
>
> I'd like to announce a little tool that I have been using for the past
> few years whenever I use git: git-number.
>
> git-number allows you to use numbers in place of filenames whenever
> you need to provide them to any git command.
>
> When run without argument it will run git-status and prepend a number
> for each file name that git-status shows, starting from 1:
>
> $ git number
> # On branch master
> # Untracked files:
> # (use "git add <file>..." to include in what will be committed)
> #
> #1 foo/bar/baz/frobnit.fu
> nothing added to commit but untracked files present (use "git add" to track)
>
> The output is exactly the same as git status (with color), but with
> numbers associated with each file that is shown.
>
> Now, instead of writing:
>
> $ git add foo/bar/baz/frobnit.fu
>
> You can just do
>
> $ git number add 1
>
Nice. I have something similar in a private tool (same problem: too
long paths to type). This can be made applicable to a few other
commands too, like 'diff --stat'. I think the magic character [1], be
it ':' or '/', can be used to make this (the syntax is for
demostration only):
$ git add :@{1}
equivalent to your 'git number add 1'.
[1] http://article.gmane.org/gmane.comp.version-control.git/169844
--
Duy
prev parent reply other threads:[~2011-03-24 5:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-24 4:51 Announce: git-number Nazri Ramliy
2011-03-24 5:46 ` Nguyen Thai Ngoc Duy [this message]
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='AANLkTi==8_hssWSHkR0DTynibtT83iUEq-M_nPO5gN1m@mail.gmail.com' \
--to=pclouds@gmail.com \
--cc=ayiehere@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).