diff options
author | Aaron LI <aaronly.me@outlook.com> | 2017-02-28 10:09:54 +0800 |
---|---|---|
committer | Aaron LI <aaronly.me@outlook.com> | 2017-02-28 10:09:54 +0800 |
commit | e50980f025cd460282ecb2b2a3bed7c72250416b (patch) | |
tree | 98f1e9cb4ca8da4bd3d5b664cb8eaf4eb8d57b60 /_profile | |
parent | f69127878fa2ae49359d54cc31643f1a8f983ccd (diff) | |
download | dotfiles-e50980f025cd460282ecb2b2a3bed7c72250416b.tar.bz2 |
Update command existence check function
Credit:
* Stackoverflow: Check if a program exists from a Bash script
Credit: https://stackoverflow.com/a/677212/4856091
Diffstat (limited to '_profile')
-rw-r--r-- | _profile | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -31,8 +31,9 @@ _path_append() { } ## Check the existence/accessibility of a command +# Credit: https://stackoverflow.com/a/677212/4856091 _exists() { - which $1 &> /dev/null + command -v "$1" >/dev/null 2>&1 } ## Check whether the program is running |