cknadler / vim-anywhere

Use Vim everywhere you've always wanted to
MIT License
3.67k stars 146 forks source link

Support capital 'Darwin' $OSTYPE #96

Open sh78 opened 6 years ago

sh78 commented 6 years ago

On some macOS environments, the $OSTYPE environment variable is 'Darwin' (capitalized) and not 'darwin'. This caused the install script to echo "OS Darwin is not supported!" and exit, even if everything was in fact in order.

This patch uses a case-insensitive regex against a standard bash operator to allow any $OSTYPE that starts with 'Darwin' or 'darwin'.

All other instances of conditional checks for darwin* are also patched across the code base.

sh78 commented 6 years ago

Also - so happy I found this. Multiple times per day at work I press escape in out ticketing system's textarea and loose my entire comment. Really cool that you pulled this off.