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

View file

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