chiark
/
gitweb
/
~mdw
/
profile
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
474f69a
)
dot/profile (__mdw_programp): Use `command -v' rather than `type'.
author
Mark Wooding
<mdw@distorted.org.uk>
Thu, 11 Jul 2024 11:22:27 +0000
(12:22 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Thu, 11 Jul 2024 11:22:27 +0000
(12:22 +0100)
POSIX specifies the exit status for the former but not the latter.
dot/profile
patch
|
blob
|
blame
|
history
diff --git
a/dot/profile
b/dot/profile
index f8d4dc9635431e07180f694a5f6c1d5f36db1e5c..ad6deeb2850ae407b8200d13daedf6b1f291f5bb 100644
(file)
--- a/
dot/profile
+++ b/
dot/profile
@@
-44,7
+44,7
@@
__mdw_addto () {
## __mdw_programp NAME
##
## Does NAME exist as an executable program?
-__mdw_programp () {
type >/dev/null 2>&1 "$1"
; }
+__mdw_programp () {
command -v "$1" >/dev/null 2>&1
; }
## __mdw_setconf VAR CONF [DEFAULT]
##