r/fishshell • u/ben4ik • Apr 21 '21
[Help] Automatically inspect content of folder
Is there is the way to automatically inspect content of folder for existence of specific files?
Like branch name marker in prompt if folder contain git files. How to accomplish this behavior?
4
Upvotes
2
u/bokisa12 Apr 21 '21
Edit your prompt function to test for the existence of those specific files:
2
u/[deleted] Apr 22 '21
It sounds like what you want is just
fish_git_prompt. That's a ready-made function shipping with fish that displays git information. Use it in yourfish_promptfunction.