Expand description
Portable executable discovery.
Winx used to probe for programs with sh -c 'command -v …', which assumes a
POSIX shell on PATH. Native Windows has no sh, and its bash.exe may be
the WSL launcher in System32 rather than a usable shell, so lookups are
done directly against PATH (honoring PATHEXT on Windows) and the known
Git for Windows install locations.
Functions§
- bash_
executable - The
bashexecutable Winx should drive. On Unix this is whateverPATHresolves. On Windows the Git for Windows shell is preferred andSystem32\bash.exe(the WSL launcher, which needs a distribution and does not honorPROMPT_COMMAND) is never selected. - find_
on_ path - Locate
programonPATH. A name with a path separator is checked as-is. On Windows, a bare name is tried with everyPATHEXTsuffix (.exe,.cmd, …) as well as verbatim. - is_
available - Whether
programcan be found onPATH. Best-effort: used for advisory hints and shell selection, never as a security boundary.