mirror of
https://github.com/captn3m0/dotfiles.git
synced 2024-09-28 22:22:51 +00:00
steal from @harman28
This commit is contained in:
parent
f0c461be13
commit
4375964e19
@ -528,4 +528,22 @@ elif type compctl &>/dev/null; then
|
|||||||
}
|
}
|
||||||
compctl -K _npm_completion npm
|
compctl -K _npm_completion npm
|
||||||
fi
|
fi
|
||||||
###-end-npm-completion-###
|
###-end-npm-completion-###
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# Stolen from @ThatHarmanSingh
|
||||||
|
function sprint() {
|
||||||
|
|
||||||
|
# Set time format to unix so we can subtract
|
||||||
|
HISTTIMEFORMAT='%s ' history |
|
||||||
|
# History returns way more than needed
|
||||||
|
tail -n 4000 |
|
||||||
|
# Grep for git commits (after timestamps)
|
||||||
|
grep -E '^\d+\s+\d+\s+gc' |
|
||||||
|
# Max 15 days ago
|
||||||
|
awk -v now=$(date +%s) '(now - $2) < 15*24*60*60' |
|
||||||
|
# Cut out the timestamps for uniq check
|
||||||
|
cut -d ' ' -f 4- |
|
||||||
|
# To handle multiple commit-pull-reset-commit cycles
|
||||||
|
uniq
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user