From 1f4f046bb18bf77d860aa8fe60d186e20968a4e2 Mon Sep 17 00:00:00 2001 From: Ismo Vuorinen Date: Sat, 21 Jun 2025 21:19:46 +0300 Subject: [PATCH] docs(utils): clarify in_path usage (#129) --- local/dfm/lib/utils.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/local/dfm/lib/utils.sh b/local/dfm/lib/utils.sh index 820ae01..61889f4 100644 --- a/local/dfm/lib/utils.sh +++ b/local/dfm/lib/utils.sh @@ -447,18 +447,18 @@ utils::is_installed() command -v "$1" > /dev/null 2>&1 } -# Check if a directory exists in the current env PATH and return 0 if it does. -# Otherwise, return 1. +# Check if an executable exists in one of the directories listed in PATH and +# return 0 if it does. Otherwise, return 1. # # @example -# if utils::in_path /usr/local/bin; then -# echo "/usr/local/bin is in PATH" +# if utils::in_path ls; then +# echo "ls is available in PATH" # else -# echo "/usr/local/bin is not in PATH" +# echo "ls is not available in PATH" # fi # -# @description Check if a directory is in PATH -# @param $1 Directory to check +# @description Check if an executable is in PATH +# @param $1 Command to check # Checks if a specified executable is available in one of the directories in the PATH. # # Globals: