;tools: note gtree issue

This commit is contained in:
Simon Michael 2024-10-22 07:47:59 -10:00
parent f96df24a00
commit 7c31ddfba2

View File

@ -63,6 +63,7 @@ if [[ $HELP = 1 ]]; then usage; exit; fi
REGEX="${ARGS[0]:-.}" REGEX="${ARGS[0]:-.}"
ROOT=$(pwd) ROOT=$(pwd)
GITLS="git ls-files ${U:+-o $(if [[ $I = 1 ]]; then echo ''; else echo '--exclude-standard'; fi)}" GITLS="git ls-files ${U:+-o $(if [[ $I = 1 ]]; then echo ''; else echo '--exclude-standard'; fi)}"
# XXX the hledger accounts trick doesn't work for paths with double spaces in them
$GITLS \ $GITLS \
| grep -iE "$REGEX" \ | grep -iE "$REGEX" \
| sed -e 's%/%/:%g' -e "s%^%account $ROOT/:%" \ | sed -e 's%/%/:%g' -e "s%^%account $ROOT/:%" \