4 ms·
An alias for bash gitdiff() { git diff --patience --ignore-space-at-eol -b -w --ignore-blank-lines $1 }
by civilian 13y ago
An alias for bash
gitdiff() {
git diff --patience --ignore-space-at-eol -b -w --ignore-blank-lines $1
}
- ominous_prime 13y agowhy make a bash function, when git has it's own alias feature? Also, you're only accepting one argument, where there could be many depending on your refspec and path.
- Cyranix 13y agoFor those wondering: in ~/.gitconfig or similar, [alias] df = diff --patience --ignore-space-at-eol -b -w --ignore-blank-lines
- deleted 13y ago[deleted]
- prakashk 13y agoI am being pedantic, but that would be a function and not an alias. This one is simple enough to be defined as an alias: alias gitdiff='git diff --patience --ignore-space-at-eol -b -w --ignore-blank-lines' This[1] discusses aliases vs functions (just to make my reply a bit more useful [may be not for you, but in general] and to me feel less guilty.) [1] http://unix.stackexchange.com/questions/30925/in-bash-when-to-alias-when-to-script-and-when-to-write-a-function http://unix.stackexchange.com/questions/30925/in-bash-when-t...
- civilian 13y agooops... yes. I'll stop posting on HN before I've eaten.