use command -v instead of which

This commit is contained in:
Leonora Tindall 2026-08-19 11:05:28 -05:00
parent 073ff8fd92
commit 0f5ca22086
4 changed files with 8 additions and 8 deletions

4
dnote
View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
if [ -f "$(which nnote)" ]; then
NNOTE="$(which nnote)"
if [ -f "$(command -v nnote)" ]; then
NNOTE="$(command -v nnote)"
else
NOTEBIN="$( dirname -- "$( readlink -f -- "$0"; )"; )"
NNOTE="$NOTEBIN/nnote"

4
gnote
View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
if [ -f "$(which nnote)" ]; then
NNOTE="$(which nnote)"
if [ -f "$(command -v nnote)" ]; then
NNOTE="$(command -v nnote)"
else
NOTEBIN="$( dirname -- "$( readlink -f -- "$0"; )"; )"
NNOTE="$NOTEBIN/nnote"

4
mnote
View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
if [ -f "$(which nnote)" ]; then
NNOTE="$(which nnote)"
if [ -f "$(command -v nnote)" ]; then
NNOTE="$(command -v nnote)"
else
NOTEBIN="$( dirname -- "$( readlink -f -- "$0"; )"; )"
NNOTE="$NOTEBIN/nnote"

4
ynote
View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
if [ -f "$(which nnote)" ]; then
NNOTE="$(which nnote)"
if [ -f "$(command -v nnote)" ]; then
NNOTE="$(command -v nnote)"
else
NOTEBIN="$( dirname -- "$( readlink -f -- "$0"; )"; )"
NNOTE="$NOTEBIN/nnote"