mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-13 18:53:04 +00:00
docs(utils): clarify in_path usage (#129)
This commit is contained in:
@@ -447,18 +447,18 @@ utils::is_installed()
|
|||||||
command -v "$1" > /dev/null 2>&1
|
command -v "$1" > /dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check if a directory exists in the current env PATH and return 0 if it does.
|
# Check if an executable exists in one of the directories listed in PATH and
|
||||||
# Otherwise, return 1.
|
# return 0 if it does. Otherwise, return 1.
|
||||||
#
|
#
|
||||||
# @example
|
# @example
|
||||||
# if utils::in_path /usr/local/bin; then
|
# if utils::in_path ls; then
|
||||||
# echo "/usr/local/bin is in PATH"
|
# echo "ls is available in PATH"
|
||||||
# else
|
# else
|
||||||
# echo "/usr/local/bin is not in PATH"
|
# echo "ls is not available in PATH"
|
||||||
# fi
|
# fi
|
||||||
#
|
#
|
||||||
# @description Check if a directory is in PATH
|
# @description Check if an executable is in PATH
|
||||||
# @param $1 Directory to check
|
# @param $1 Command to check
|
||||||
# Checks if a specified executable is available in one of the directories in the PATH.
|
# Checks if a specified executable is available in one of the directories in the PATH.
|
||||||
#
|
#
|
||||||
# Globals:
|
# Globals:
|
||||||
|
|||||||
Reference in New Issue
Block a user