For example, the following commands doesn't work. I wonder how to work around it, thanks.
[liuke@liuke-mbp ~]$ function showxx() { echo xx; }
[liuke@liuke-mbp ~]$ showxx
xx
[liuke@liuke-mbp ~]$ cat a.bash
#!/bin/bash
showxx
[liuke@liuke-mbp ~]$ ./a.bash
./a.bash: line 2: showxx: command not found