euler/clean_uncommited

9 lines
200 B
Text
Raw Normal View History

2011-12-20 09:21:07 +00:00
#!/usr/bin/env zsh
[[ $1 != "-f" ]] && { print "Use -f option to delete:" }
for fic in $(git status | tail -n +5| head -n -1 |awk '{print $2}'); do
print '[?]' $fic
[[ $1 = "-f" ]] && \rm $fic
done