ConradIrwin/dotgpg — pull request #1 by badboy (2014-05-13 08:18:55+00:00)
Title: Use `command` to check if the editor is available

I recently looked into a lot of shell stuff, especially what really is POSIX-compatible and the best ways to do several things.
From what I found it's best to not use `which`, but instead shell built-ins to determine if a command is available. `command` is available everywhere, fully specified in POSIX and will definitely set the correct exit code. Read [Stack Overflow](http://stackoverflow.com/questions/592620/how-to-check-if-a-program-exists-from-a-bash-script/677212#677212) for more.
I proposed a similar solution at two other projects ([gpm, issue #24](https://github.com/pote/gpm/pull/24) and for the redis `install_server.sh` script)

Thanks for this project, it might come in handy for me.