holygeek / git-number

Use numbers for dealing with files in git
ISC License
281 stars 25 forks source link

Number column doesn't take maximum number's width #8

Open EDmitry opened 11 years ago

EDmitry commented 11 years ago

I've noticed that other columns are aligned in the output, but the first numbers column is always separated from the second one with one space. Is there some easy way to make it always reserve 2 characters at least so that stuff is aligned nicely?

Thanks!

holygeek commented 11 years ago

Do you mean going from this:

$ gn
# On branch master
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#1      0001-Introduce-struct-date_mode-to-replace-enum-date_mode.patch
#2      0002-wip-parse_date_format.patch

to this?:

$ gn
# On branch master
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
# 1     0001-Introduce-struct-date_mode-to-replace-enum-date_mode.patch
# 2     0002-wip-parse_date_format.patch
EDmitry commented 11 years ago

Oh, it's actually for short listing mode, that means going from:

1  M vim/bundle/vim-colors-solarized
2  M vim/bundle/vim-markdown
3 ?? bin/lldb.tgz
..
12  M something

to

1   M vim/bundle/vim-colors-solarized
2   M vim/bundle/vim-markdown
3  ?? bin/lldb.tgz
..
12  M something
rcdailey commented 10 years ago

I noticed this as well and it would be nice to have the number column have a fixed width, padded with whitespace on the left based on the maximum number of digits.