fish: functions: Execute fast-tags only if in a git project

In neovim, we run this after saving a file. However, when opening a
Haskell file which is outside of a project or in a directory which
has all other Haskell code, it would generate tags for every project
in this directory blocking neovim in the mean time.
This commit is contained in:
Sanchayan Maity 2024-01-06 14:35:38 +05:30
parent b2e66cbff4
commit f3593d60d1
Signed by: sanchayanmaity
GPG Key ID: 6F6A0609C12038F3
1 changed files with 6 additions and 4 deletions

View File

@ -1,7 +1,9 @@
function fasttags --description "Generate tags for Haskell project"
if not test -e tags
fast-tags --fully-qualified -R .
else
fast-tags --fully-qualified -R $argv
if test -d .git
if not test -e tags
fast-tags --fully-qualified -R .
else
fast-tags --fully-qualified -R $argv
end
end
end