#git-status #git #numbers #filenames #command-line-tool #nu #replace

app gitnu

gitnu indexes your git status so you can use numbers instead of filenames

28 releases

0.7.7 Jun 1, 2024
0.7.5 Mar 5, 2024
0.7.4 Nov 7, 2023
0.7.2 Jul 6, 2023
0.5.0 Nov 25, 2022

#29 in Command line utilities

Download history 58/week @ 2024-07-28 12/week @ 2024-09-22

3,762 downloads per month

MIT license

48KB
1K SLoC

gitnu

gitnu adds numbers to git status.

build status crates.io

Install

gitnu can be installed by running cargo install gitnu.

Usage

$ git nu status
# On branch master
# Untracked files:
# 1       .gitignore
# 2       README.md
# 3       doc/
# 4       src/
#
# nothing added to commit but untracked files present

Note the similarity of the output git nu status to that of git status.
They are identical except for the numbers in front of filenames.

After gitnu status, you can now use numbers in place of filenames for git commands:

$ git nu add 2
$ git nu status
# On branch master
# Changes to be committed:
# 1       new file:   README.md
#
# Untracked files:
# 2       .gitignore
# 3       doc/
# 4       src/

In general, whenever you used to do

git <command> [filenames and arguments]

You can now use

git nu <command> [file numbers and arguments]

gitnu will silently replace numbers with their filenames and pass everything else intact into git.

gitnu accepts multiple arguments and even number ranges:

$ git nu add 2 5-7 # same as `git nu add 2 5 6 7`

You can even mix file names with numbers.

No runtime deps