Add flgrep to grep tracked files in a Fossil repo
This commit is contained in:
parent
cc1fb01166
commit
02797af27b
1 changed files with 9 additions and 0 deletions
9
zshrc
9
zshrc
|
@ -225,6 +225,15 @@ if which fossil &>/dev/null; then
|
||||||
fi
|
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() {
|
git2fl() {
|
||||||
local gitdir=$(git rev-parse --show-toplevel)/.git
|
local gitdir=$(git rev-parse --show-toplevel)/.git
|
||||||
local repo=$(fossil info | awk '/^repository:/ { print $2 }')
|
local repo=$(fossil info | awk '/^repository:/ { print $2 }')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue