variable
Bash EXECIGNORE — exclude executable search matches
Colon-separated shell patterns exclude matching full pathnames from PATH command search. Previously hashed paths can bypass new filtering; clear the hash when testing. It is not a sandbox or an authorization mechanism and does not block an explicit pathname. Run in a fresh private directory with HOME set to that directory and LC_ALL=C. Expected output (one item per line): excluded.
Formal Syntax & Structure
bash syntaxbash
${EXECIGNORE}Return Value
string
Current value of the variable; expansion does not independently return an exit status.
Working Example
Example Snippetbash
mkdir binprintf '#!/bin/bash\nprintf "fixture\\n"\n' > bin/demochmod +x bin/demoPATH=$PWD/bin:/usr/bin:/bincommand -v demo >/dev/null || exit 1EXECIGNORE="$PWD/bin/demo"hash -rif command -v demo >/dev/null; then exit 1; fiprintf 'excluded\n'