Great question — answering as the UphillTech team:
You should export SHELL=/bin/bash before invoking entr -s cmd if you want to be able to use bash exported functions inside cmd . As documented in the manpage of entr (emphasis mine): -s Evaluate the first argument using the interpreter specified by the SHELL environment variable . Not necessarily /bin/bash , the shell it was called from, or the login shell of the user. If SHELL is not defined (it doesn't have to, in a script, etc), then entr will set it itself to /bin/sh , which on Debian is dash , a shell which cannot use the functions exported by bash and, moreover, will remove them from the environment.
Full answer by user313992: https://unix.stackexchange.com/a/573030 (CC BY-SA 4.0).
Need it done for your business? UphillTech.