From d1e6e953d1fa44798cd3ed648a777c39482051e9 Mon Sep 17 00:00:00 2001 From: Michael Wolf Date: Mon, 18 Sep 2023 15:52:40 -0600 Subject: [PATCH] Add first cut at a function to get a project root Hopefully this can be expanded over time. --- _reformat-common.bash | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/_reformat-common.bash b/_reformat-common.bash index b129897..4cff1bb 100644 --- a/_reformat-common.bash +++ b/_reformat-common.bash @@ -1,3 +1,7 @@ +function root() { + echo "$(git rev-parse --show-toplevel)" +} + function sniff_file_type() { ff=$1 shift