开发者

How do I check a binary exists in the PATH in a Vim plugin?

开发者 https://www.devze.com 2023-02-15 19:01 出处:网络
I\'m writing a Vim plugin.I need to call a binary开发者_运维技巧 which should be in the PATH.But I want to display an error message if its not.Whats the best way to find out if the binary is in the PA

I'm writing a Vim plugin. I need to call a binary开发者_运维技巧 which should be in the PATH. But I want to display an error message if its not. Whats the best way to find out if the binary is in the PATH?

I'm hoping to find a solution that is portable across different operating systems. But that doesn't seem very easy and I'll settle for a solution that works on unix/linux/mac.


Check this: :help executable()

0

精彩评论

暂无评论...
验证码 换一张
取 消