diff options
author | adam <56338480+adastx@users.noreply.github.com> | 2022-10-09 23:45:18 +0200 |
---|---|---|
committer | adam <56338480+adastx@users.noreply.github.com> | 2022-10-09 23:45:18 +0200 |
commit | a514903307a35963ede428b565ea499861839ef1 (patch) | |
tree | 3bf9ed0b4c26c8f91b24617cd40a36c16a865821 /.local/bin/in-git-repo | |
parent | 19a80063e858fdfbafbce24f8e9ea3be044b73f0 (diff) |
nvim: fugitive better git repo detection
Diffstat (limited to '.local/bin/in-git-repo')
-rwxr-xr-x | .local/bin/in-git-repo | 9 |
1 files changed, 9 insertions, 0 deletions
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 |