Skip to content

Commands

Index

commands::executable_exists

Return true if the named executable is on PATH, excluding wrappers in main/ and other/.

Arguments

  • $1 (executable): name

Exit codes

  • 0: if true
  • 1: if false

commands::executable_path

Print the absolute path of an executable (first match on PATH), excluding wrappers in main/ and other/. Output: stdout — absolute path, or empty string if not found

Arguments

  • $1 (executable): name

commands::assert_executable_exists

Die if the named executable is not found on PATH (excluding wrappers in main/ and other/).

Arguments

  • $1 (executable): name

Exit codes

  • 0: if the executable exists
  • 1: via log::die if not (process exits)

commands::function_exists

Return true if the named shell function is defined in the current shell.

Arguments

  • $1 (function): name

Exit codes

  • 0: if true
  • 1: if false