dotfiles

<-- duh.
Log | Files | Refs | LICENSE

commit 53617e75859ed128bbbda0e20e238dab7c5eeb9a
parent 8b8e0a09225473296a6a8d04b0f94099cc4c940c
Author: hhvn <dev@hhvn.uk>
Date:   Wed,  5 May 2021 18:23:41 +0100

.c/g/find .c/g/config .c/g/m/m/git-fi.1: add find wrapper for git

Diffstat:
M.config/git/config | 1+
A.config/git/find | 6++++++
A.config/git/man/man1/git-fi.1 | 21+++++++++++++++++++++
3 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/.config/git/config b/.config/git/config @@ -14,6 +14,7 @@ pu = !sh ~/.config/git/push pa = !sh ~/.config/git/push --all ef = !sh ~/.config/git/effort + fi = !sh ~/.config/git/find br = branch se = send-email ad = add diff --git a/.config/git/find b/.config/git/find @@ -0,0 +1,6 @@ +#!/bin/sh + +find=$(find . "$@" | sed 's~^./~~') +git=$(git ls-files) + +printf "$find\n$git\n" | sort | uniq -c | awk '$1 > 1 {$1=""; print}' | sed 's/^[[:space:]]*//' diff --git a/.config/git/man/man1/git-fi.1 b/.config/git/man/man1/git-fi.1 @@ -0,0 +1,21 @@ +.Dd 05 May 2021 +.Dt git-fi 1 +.Os hhvn-git(7) +.Sh Name +.Nm git-fi +.Nd calls +.Xr find 1 +but only returns files tracked by git. +.Sh SYNOPSIS +.Nm git fi +.Op Fl HL +.Ar path... +.Op Ar operand_expression... +.Sh SEE ALSO +.Bl -item -compact +.It +.Xr git-ls-files 1 +.It +.Xr find 1 +.Sh AUTHOR +.An hhvn Aq Mt dev@hhvn.uk .