pash: swap to more portable command -v

This commit is contained in:
Dylan Araps 2019-11-30 09:28:19 +00:00
parent ade92b56a7
commit 540ed1abc2
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E
1 changed files with 3 additions and 3 deletions

6
pash
View File

@ -62,7 +62,7 @@ pw_copy() {
}
pw_list() {
if hash tree 2>/dev/null; then
if command -v tree 2>/dev/null; then
tree --noreport
else
@ -136,8 +136,8 @@ main() {
# Look for both 'gpg' and 'gpg2',
# preferring 'gpg2' if it is available.
hash gpg 2>/dev/null && gpg=gpg
hash gpg2 2>/dev/null && gpg=gpg2
command -v gpg 2>/dev/null && gpg=gpg
command -v gpg2 2>/dev/null && gpg=gpg2
[ "$gpg" ] ||
die "GPG not found."