configs  Check-in [b6c2a67aab]

Overview
Comment:Add flgrep to grep tracked files in a Fossil repo
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: b6c2a67aab3918b9b12d001ddc9843cf3688cdf98486f63c1d8342eb26d7500e
User & Date: js on 2020-08-15 15:25:31
Other Links: manifest | tags
Context
2020-08-15
15:52
Only apply flgrep to current directory & children check-in: ca12553441 user: js tags: trunk
15:25
Add flgrep to grep tracked files in a Fossil repo check-in: b6c2a67aab user: js tags: trunk
2020-06-27
09:25
vim/syntax/objc.vim: Add OF_DIRECT(_MEMBERS) check-in: 564302e990 user: js tags: trunk
Changes

Modified zshrc from [dd178ab459] to [b46b9cd313].

220
221
222
223
224
225
226









227
228
229
230
231
232
233
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242







+
+
+
+
+
+
+
+
+







			red="$(tput setaf 1)"
			green="$(tput setaf 2)"
			reset="$(tput sgr0)"
			fossil diff -N "$@" | sed "s/^+.*$/$green&$reset/" |
				sed "s/^-.*$/$red&$reset/" | less -FRX
		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 }')

		[ -z "$repo" ] && repo="$1"