Search notes:

vim script: executable

executable("foo") returns 1 if there is an executable named foo in path and 0 otherwise. If executable() is not implemented, it returns -1.
redir > executable.out

if !executable('reg')
    echo 'reg ist not executable'
    q
endif

echo system('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts"')
q

"    Arial (TrueType)    REG_SZ    arial.ttf
"    Arial Italic (TrueType)    REG_SZ    ariali.ttf
"    Arial Bold (TrueType)    REG_SZ    arialbd.ttf
"    Arial Bold Italic (TrueType)    REG_SZ    arialbi.ttf
"    ...
"    ...
Github repository about-vim, path: /vimscript/functions/executable.vim

See also

exepath("foo") returns the path to the executable foo.
Vim: built in functions
VIM script

Index