From f0f628fc2c99ee387dc729c09ebde77dc6ec9644 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 6 Mar 2017 19:12:56 +0100 Subject: which -> command -v http://stackoverflow.com/questions/592620/check-if-a-program-exists-from-a-bash-script/677212#677212 TL;DR `command` is a POSIX-specified builtin. `which` is unreliable. --- hooks/post-up/emacs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hooks/post-up/emacs b/hooks/post-up/emacs index 53de6dad..05a5c9d1 100755 --- a/hooks/post-up/emacs +++ b/hooks/post-up/emacs @@ -1,6 +1,6 @@ #!/bin/sh -EMACS_COMMAND=$(which Emacs || which emacs) +EMACS_COMMAND=$(command -v Emacs || command -v emacs) if [[ -s $EMACS_COMMAND ]] then -- cgit 1.4.1