Pare down git alias command, expand on its TODOs

As-is, the `column -t` invocation works very poorly and is effectively
useless as it can't communicate the information it ought to. For the
time being (until the next Debian stable coreutils update) the format
`alias = 'cmd'` is more readable and useful. This commit also expands a
good bit on the ideal command chain of the post-coreutils update alias
and the possible issues left to solve after that implementation is done.
master
Jordan Atwood 2 years ago
parent 706da4a453
commit 98d86f6cfa
Signed by: nightfirecat
GPG Key ID: 615A619C2D73A6DF
  1. 9
      src/.gitconfig

@ -1,7 +1,10 @@
[alias] [alias]
# TODO: fix columnizing (-l arg with v2.37+, or some other workaround?) # TODO: add columnizing (after -l arg with linux-utils v2.37+, or some other workaround?)
# TODO: wrap command column for long commands # eg. git config -l | grep '^alias\\.' | cut -d '.' -f '2-' | column -s '=' -t -l 2 | sort
alias = !git config --get-regexp '^alias\\.' | cut -d '.' -f '2-' | sed -re 's/^([^ ]+) /\\1*/g' | column -s '*' -t | sort # TODO: wrap command column for long commands (depends on above)
# eg. column -s '=' -t -l 2 -N 'alias,val' -W val -d
# TODO: reduce extra space shown in command output from multiline aliases, see `co-pr`
alias = !git config -l | grep '^alias\\.' | cut -d '.' -f '2-' | sed -r -e 's/=/ = /' | sort
amend = commit --amend amend = commit --amend
amend-a = commit -a --amend amend-a = commit -a --amend
# TODO: fix below; that method is not accurate # TODO: fix below; that method is not accurate

Loading…
Cancel
Save