1
1
Fork 0

Add flgrep to grep tracked files in a Fossil repo

This commit is contained in:
Jonathan Schleifer 2020-08-15 15:25:31 +00:00
parent cc1fb01166
commit 02797af27b

9
zshrc
View file

@ -225,6 +225,15 @@ if which fossil &>/dev/null; then
fi
}
flgrep() {
local ret=1
fossil changes --all | sed 's/^.* //' | while read file; do
grep -H "$@" "$file" && ret=0
[ $? -gt 1 ] && return $?
done
return $ret
}
git2fl() {
local gitdir=$(git rev-parse --show-toplevel)/.git
local repo=$(fossil info | awk '/^repository:/ { print $2 }')