I would like to figure out in my .bashrc
(or one of the files it sources) whether Vim has the -p
option available and if so create an alias.
Now, that same .bashrc
is used on numerous systems including some ancient ones where Vim still doesn't know the -p
option.
What I need is a way to check for the availability of the option without actually starting up Vim ...
vim -p || echo "Not available"
... where instead of the echo I do something else came to mind, but unfortunately that only works when the -p
option is not available. When it is available, this will actually start up Vim, which is what I want to avoid.
I've experimented with opening /dev/null
and /dev/zero
to no avail ...