From a514903307a35963ede428b565ea499861839ef1 Mon Sep 17 00:00:00 2001 From: adam <56338480+adastx@users.noreply.github.com> Date: Sun, 9 Oct 2022 23:45:18 +0200 Subject: nvim: fugitive better git repo detection --- .local/bin/in-git-repo | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 .local/bin/in-git-repo (limited to '.local/bin/in-git-repo') diff --git a/.local/bin/in-git-repo b/.local/bin/in-git-repo new file mode 100755 index 0000000..e155bc8 --- /dev/null +++ b/.local/bin/in-git-repo @@ -0,0 +1,9 @@ +#!/bin/bash + +res=$(git rev-parse --is-inside-work-tree 2>/dev/null) + +if [[ $res == true ]]; then + exit 0 +else + exit 1 +fi -- cgit v1.2.3-70-g09d2