git_show_blame () {
if [ -z "$3" ]
then
printf "USAGE: git_show_blame filepath start_line_num end_line_num" && return 1
else
[ ! -z "$4" ] && printf "\\n${LPURP}[git_show_blame]${NC} Warning: extra arguments provided. Ignoring everything after the first 3\\n\\n"
git show $(git blame "$1" -L "$2","$3" | awk '{print $1}')
return $?
fi
}
Use with recursive search `grep -Rn your_regex .` to track down the original commit that your pesky coworker added two years ago without any corresponding documentation for an alert that's going critical at 2am...(only slightly exaggerating there :P)
I used to race and coach skiing for many years. Intermediate skiers always used to ask me what skis to buy to make them better at [ice|powder|moguls|steeps|etc] while I and most proficient skiers used the same boards every day in all conditions. This tool reminds me of that.
* I acknowledge that some really great skiers are geeked on their equipment and use a variety of skis. Point still stands.
What exactly is the point, other than you just calling the author insufficiently advanced by way of some creaky analogy? One of the many things that distinguishes programming from skiing is that it's fairly easy for people at all levels of expertise to make their own tools. And that's what this person did.
Comments (229) 38 threads
Earlier commentsNot a UI but helps with some commands you run in a row quite often
http://github.com/robertzk/send.zsh
* I acknowledge that some really great skiers are geeked on their equipment and use a variety of skis. Point still stands.
All comments shown.
Couldn't load more comments. Check your connection and try again.