The question is probably hard to understand so it's probably better with an illustrative example.
echo "function testcmd() { alias echo-test='echo test'; } " > define_testcmd; source defin
e_testcmd && testcmd && echo-test
throws a error echo-test: command not found
.
Calling echo-test
after this line works.