diff options
author | Alan Pearce | 2017-03-06 19:12:56 +0100 |
---|---|---|
committer | Alan Pearce | 2017-03-06 19:12:56 +0100 |
commit | f0f628fc2c99ee387dc729c09ebde77dc6ec9644 (patch) | |
tree | e0f8f69a3e7636a8e95ed777e5a2b4e7f9caa10a /hooks | |
parent | f8d667341977a445fd701a07112b97896b0ce1f9 (diff) | |
download | nixfiles-f0f628fc2c99ee387dc729c09ebde77dc6ec9644.tar.lz nixfiles-f0f628fc2c99ee387dc729c09ebde77dc6ec9644.tar.zst nixfiles-f0f628fc2c99ee387dc729c09ebde77dc6ec9644.zip |
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.
Diffstat (limited to 'hooks')
-rwxr-xr-x | hooks/post-up/emacs | 2 |
1 files changed, 1 insertions, 1 deletions
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 |