Show context menu items on in some types of folders


I've created a few lister context menu items, mainly related to working with Git repo's. I would prefer to have these context menu items hidden for folders where there is no git repo present, as sometimes launching these items in non-Git folders causes errors.

Is there a way where I could detect whether the folder contains a git repo and based on that, enable/disable a lister context menu item?

The @hideifpath command modifier will let you show or hide a menu item based on the path.